Skip to content

Commit

Permalink
Unify the macOS compile in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
halprin committed Dec 22, 2024
1 parent 4740d89 commit a01c3cf
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,11 @@ jobs:
cc: cl
cxx: cl
name: Windows-x64
- runner: macos-14 # Apple Silicon, but we cross-compile
- runner: macos-14 # Apple Silicon, but we make a universal binary
preset: mac
cc: cc
cxx: c++
name: macOS-Intel
- runner: macos-14 # Apple Silicon
preset: mac
cc: cc
cxx: c++
name: macOS-ARM
name: macOS
- runner: ubuntu-latest
preset: linux
cc: gcc
Expand Down Expand Up @@ -61,18 +56,22 @@ jobs:
submodules: recursive

- name: Install macOS Rosetta 2
if: ${{ matrix.os.name == 'macOS-Intel' }}
if: ${{ matrix.os.preset == 'mac' }}
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license

- name: Install macOS ARM dependencies
if: ${{ matrix.os.preset == 'mac' }}
run: brew bundle install

- name: Install Intel version of Brew
if: ${{ matrix.os.name == 'macOS-Intel' }}
if: ${{ matrix.os.preset == 'mac' }}
shell: arch -x86_64 /bin/bash -e {0}
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/usr/local/bin/brew shellenv)" # makes the Intel version of Brew and its installs are enshrined as the default
echo "PATH=$PATH" >> $GITHUB_ENV # modify $PATH so the above step persists into the future steps
- name: Install macOS dependencies
- name: Install macOS Intel dependencies
if: ${{ matrix.os.preset == 'mac' }}
run: brew bundle install

Expand Down

0 comments on commit a01c3cf

Please sign in to comment.