Skip to content

Commit

Permalink
fix brew link error on mac CI
Browse files Browse the repository at this point in the history
The github mac runner images added python 3.11 but, unlike 3.10, not via
brew. This causes brew install to fail with link conflict errors now
that boost-python3 switched over to 3.11. Workaround this, and future
python brew link errors, by ovewriting all links for python packages.

Homebrew/homebrew-core@8c79089
https://github.com/orgs/Homebrew/discussions/3895
actions/setup-python#577
actions/runner-images#6459
actions/runner-images#6507
actions/runner-images#2322
  • Loading branch information
q3aiml committed Jan 7, 2023
1 parent 3dc3d70 commit 7b08424
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ jobs:
- if: runner.os == 'macOS'
name: Mac 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 boost boost-python3 gmp mpfr gpgme
Expand Down

0 comments on commit 7b08424

Please sign in to comment.