Skip to content

Commit 0a702d7

Browse files
committed
CI: set some Homebrew knobs to accelerate installation on macOS
1 parent 37535f1 commit 0a702d7

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,23 @@ jobs:
257257
ls -alh /app/share/lfortran/lib/
258258
fi
259259
260-
- name: Install macOS Dependencies
261-
if: contains(matrix.os, 'macos')
260+
- name: Fix macOS Homebrew Configuration
261+
if: ${{ contains(matrix.os, 'macos') }}
262262
run: |
263263
# silence Homebrew tap trust warnings:
264264
(set +e ; brew untap -f aws/tap hashicorp/tap 2>&1 | perl -pe 's/#*.warning./warn: /' ; brew trust azure/bicep )
265+
# set some Homebrew knobs to accelerate installation
266+
# but only when we are not simulating the user environment brew-via-install workflow
267+
if [[ -z "${{ matrix.brew_via_install }}" ]] ; then
268+
echo HOMEBREW_NO_ANALYTICS=1 >> "$GITHUB_ENV"
269+
echo HOMEBREW_NO_AUTO_UPDATE=1 >> "$GITHUB_ENV"
270+
echo HOMEBREW_NO_GITHUB_API=1 >> "$GITHUB_ENV"
271+
echo HOMEBREW_NO_INSTALL_CLEANUP=1 >> "$GITHUB_ENV"
272+
fi
273+
274+
- name: Install macOS Dependencies
275+
if: contains(matrix.os, 'macos')
276+
run: |
265277
brew update
266278
# fpm binary distribution for macOS requires gfortran shared libraries from gcc@12
267279
brew install gcc@12

0 commit comments

Comments
 (0)