From 244d8d181dfc2de9452d4b08bdb4009af991cf54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Thu, 21 Nov 2024 20:27:23 +0200 Subject: [PATCH] github/workflows: unlink macOS pkg-config if installed This works around an issue with recent Github CI runners where Homebrew is in an intermediate state. This is where old pkg-config is installed, yet pkg-config as a package has become an alias for pkgconf, thus causing failures to automatically switch symlinks from one to the other. Ref: actions/runner-images#10984 --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb1a8620ac108..225528fe5adb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -233,6 +233,10 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print brew unlink python && brew link --overwrite python + - name: Unlink pkg-config if the CI runner happens to have it already installed + run: | + find "$(brew config | grep HOMEBREW_PREFIX | cut -f 2- -d ' ')/bin" -lname '*/pkg-config@0*/*' -print -exec brew unlink pkg-config@0.29.2 \; -quit + - name: Change Xcode version if: ${{ matrix.xcode != '' }} run: |