From 699d61f6d10860ea4b302f22de60a36b35c0b808 Mon Sep 17 00:00:00 2001 From: Totto16 Date: Mon, 18 Mar 2024 17:50:02 +0100 Subject: [PATCH] fix macos issue with new github runner images --- .github/workflows/meson.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 297f82de..69400231 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -127,16 +127,23 @@ jobs: echo "CC_LD=lld" >> "$GITHUB_ENV" echo "CXX_LD=lld" >> "$GITHUB_ENV" - - name: Install python and meson (MacOS ARM64) - if: matrix.config.os == 'macos' && matrix.config.arm + - name: Unbreak Python in GHA for 3.11 (MacOS 13 image) + if: matrix.config.os == 'macos' && matrix.config.os-version == 13 + run: | + # A workaround for "The `brew link` step did not complete successfully" error. + # See https://github.com/Homebrew/homebrew-core/issues/165793#issuecomment-1991817938 + find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete + sudo rm -rf /Library/Frameworks/Python.framework/ + brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3 + + - name: Setup meson (MacOS) + if: matrix.config.os == 'macos' run: | brew update - brew install python@3.12 - brew install meson - echo "/opt/homebrew/opt/python@3.12/libexec/bin" >> $GITHUB_PATH + brew install meson - name: Setup meson - if: matrix.config.os != 'macos' || (! matrix.config.arm) + if: matrix.config.os != 'macos' run: | python -m pip install --upgrade pip pip install meson