From 85e84e9e6585cf829ee7e553f5d8c71187088cac Mon Sep 17 00:00:00 2001 From: Edoardo Marangoni Date: Tue, 5 Nov 2024 19:21:23 +0100 Subject: [PATCH 1/2] fix(ci): Move addition of `brew` libs to other step --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bba99143c43..1b7c651eceb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -271,11 +271,6 @@ jobs: echo "${LLVM_DIR}/bin" >> $GITHUB_PATH env: LLVM_DIR: .llvm - - name: Add `brew` libs to `RUSTFLAGS` - if: matrix.metadata.os == 'macos-14' - shell: bash - run: | - echo "RUSTFLAGS=-L/opt/homebrew/lib" >> $GITHUB_ENV - name: Configure LLVM (Windows) # The Custom Windows build does not contains llvm-config.exe, so need to setup manualy here if: startsWith(matrix.build, 'windows-x64') && matrix.llvm_url @@ -292,6 +287,7 @@ jobs: # using gnu-tar is a workaround for https://github.com/actions/cache/issues/403 brew install gnu-tar echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV + echo "RUSTFLAGS=-L/opt/homebrew/lib" >> $GITHUB_ENV if: startsWith(matrix.os, 'macos') - uses: actions/cache@v2 with: From 8e43f3385b298b8ff6d8ad38e181f033018f82c3 Mon Sep 17 00:00:00 2001 From: Edoardo Marangoni Date: Wed, 6 Nov 2024 08:52:56 +0100 Subject: [PATCH 2/2] fix(ci): Use specific step to install homebrew libs to apple silicon only --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b7c651eceb..42def2f64a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -281,13 +281,16 @@ jobs: echo LLVM_ENABLE=1 >> $GITHUB_ENV env: LLVM_DIR: .llvm + - name: Add `brew` libraries (Apple Silicon) + run: | + echo "RUSTFLAGS=-L/opt/homebrew/lib" >> $GITHUB_ENV + if: matrix.os == 'macos-14' - name: Set up dependencies for Mac OS run: | brew install automake # using gnu-tar is a workaround for https://github.com/actions/cache/issues/403 brew install gnu-tar echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV - echo "RUSTFLAGS=-L/opt/homebrew/lib" >> $GITHUB_ENV if: startsWith(matrix.os, 'macos') - uses: actions/cache@v2 with: