From 259bb63c49fc6c760f08127eee58df03dcbce26c Mon Sep 17 00:00:00 2001 From: "Silvio Tomatis (aider)" Date: Sat, 7 Dec 2024 23:01:24 +0100 Subject: [PATCH] fix: Correct x86_64 Homebrew installation and dependency management in macOS build workflow --- .github/workflows/build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 175ea55..c29d02a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,9 +69,18 @@ jobs: if [ "${{ matrix.arch }}" = "x86_64" ]; then # Install x86_64 versions for Intel builds HOMEBREW_PREFIX="/usr/local" - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || true - arch -x86_64 brew install pkg-config gtk4 pango cairo gdk-pixbuf at-spi2-core graphene libadwaita || true - arch -x86_64 brew upgrade pkg-config gtk4 pango cairo gdk-pixbuf at-spi2-core graphene libadwaita || true + # Create /usr/local if it doesn't exist + sudo mkdir -p /usr/local + sudo chown -R $(whoami) /usr/local + + # Install Homebrew for x86_64 + arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + # Add Homebrew to PATH + eval "$(/usr/local/bin/brew shellenv)" + + # Install dependencies + arch -x86_64 /usr/local/bin/brew install pkg-config gtk4 pango cairo gdk-pixbuf at-spi2-core graphene libadwaita # Set pkg-config path for x86_64 echo "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/opt/pango/lib/pkgconfig:/usr/local/opt/cairo/lib/pkgconfig:/usr/local/opt/gdk-pixbuf/lib/pkgconfig:/usr/local/opt/graphene/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/gtk4/lib/pkgconfig:/usr/local/opt/libadwaita/lib/pkgconfig" >> $GITHUB_ENV