diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cd9ec46d..66c756b0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,4 +1,4 @@ -name: C/C++ CI macoS +name: C/C++ CI MacOS on: push: @@ -13,6 +13,15 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies run: | + # Unlink and re-link to prevent errors when github mac runner images + # install python outside of brew, for example: + # https://github.com/orgs/Homebrew/discussions/3895 + # https://github.com/actions/setup-python/issues/577 + # https://github.com/actions/runner-images/issues/6459 + # https://github.com/actions/runner-images/issues/6507 + # https://github.com/actions/runner-images/issues/2322 + brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done + brew update brew install \ wget \