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 Dec 19, 2023
1 parent ad66532 commit b288dd6
Show file tree
Hide file tree
Showing 2 changed files with 26 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 @@ -51,6 +51,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y 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
19 changes: 19 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

0 comments on commit b288dd6

Please sign in to comment.