From 1eec9f86667cad3b0bbafb82a83739a0d30ca09f Mon Sep 17 00:00:00 2001 From: Andy Clayton Date: Mon, 2 Jan 2023 11:31:07 -0600 Subject: fix brew link error on mac CI 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 overwriting all links for python packages. https://github.com/Homebrew/homebrew-core/commit/8c79089ae410bcd38065dfa3748bbcdb64b228d2 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 --- .github/workflows/cmake.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.github/workflows/cmake.yml') diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index fc8937f7..f055fa9f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 -- cgit v1.2.3