Skip to content

Commit

Permalink
actions: patch DNS issues on Mac OS runners
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Nov 16, 2023
1 parent d6cc772 commit 72f65b6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y shellcheck sqlite3
- name: Patch DNS
if: startsWith(matrix.os, 'macos')
run: |
# see https://github.com/actions/runner-images/issues/8649#issuecomment-1779548056
echo -e "$(ipconfig getifaddr en0) $(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
dscacheutil -q host -a name $(hostname -f)
- name: Install
run: |
pip install -e ."[all]"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,25 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Patch DNS
if: startsWith(matrix.os, 'macos')
run: |
# see https://github.com/actions/runner-images/issues/8649#issuecomment-1779548056
echo -e "$(ipconfig getifaddr en0) $(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
dscacheutil -q host -a name $(hostname -f)
CONF_PATH="$HOME/.cylc/flow/8"
mkdir -p "$CONF_PATH"
cat > "$CONF_PATH/global.cylc" <<__HERE__
[platforms]
[[localhost, $(hostname -f), $(hostname -s)]]
hosts = localhost
install target = localhost
ssh command = ssh -oBatchMode=yes -oConnectTimeout=8 -oStrictHostKeyChecking=no
__HERE__
cp "$CONF_PATH/global.cylc" "$CONF_PATH/global-tests.cylc"
echo "# $CONF_PATH/global-tests.cylc"
cat "$CONF_PATH/global-tests.cylc"
- name: Brew Install
if: startsWith(matrix.os, 'macos')
run: |
Expand Down Expand Up @@ -248,6 +267,7 @@ jobs:
-exec echo '====== {} ======' \; -exec cat '{}' \;
- name: Set artifact upload name
if: always()
id: uploadname
run: |
# artifact name cannot contain '/' characters
Expand Down

0 comments on commit 72f65b6

Please sign in to comment.