Skip to content

Commit fedf744

Browse files
committed
strengthen brew + make both builds non-blocking
1 parent d2db493 commit fedf744

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
build:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
13+
fail-fast: false
1314
matrix:
1415
os: [macos-15-intel, ubuntu-latest]
1516

@@ -26,13 +27,19 @@ jobs:
2627
if: matrix.os == 'macos-15-intel'
2728
shell: arch -x86_64 bash -e {0}
2829
run: |
29-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
30-
echo >> /Users/runner/.bash_profile
31-
echo 'eval "$(/usr/local/bin/brew shellenv bash)"' >> /Users/runner/.bash_profile
30+
if ! command -v brew >/dev/null 2>&1; then
31+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
32+
fi
33+
3234
eval "$(/usr/local/bin/brew shellenv bash)"
35+
3336
brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo
34-
# avoid link error on runner
35-
brew install python@3.11 || true
37+
38+
# python@3.11 may fail to link on GitHub's Intel macOS runners because /usr/local/bin/python3.11 already exists.
39+
# keg still installs, the build step uses brew --prefix plus local shims instead of relying on Homebrew's global symlinks
40+
brew install python@3.11 || true
41+
42+
brew --prefix python@3.11
3643
3744
- name: Runs all the stages in the shell
3845
if: matrix.os == 'ubuntu-latest'

0 commit comments

Comments
 (0)