Skip to content

Commit

Permalink
Update github release runner to include macos arm64
Browse files Browse the repository at this point in the history
Previously, the github `macos-latest` runner was still an amd64/x86_64
architecture. As such we were not able to have a purely Apple Silicon
build through the github release workflow. However, the `macos-latest`
runner is now supported by Apple Silicon[1]. As such we need to create a
specific build target for it in `.github/workflows/release.yml` as well
as update the `build_macos_amd64` target to use the `macos-13` runner
such that that architecture is still being built.

This will add an extra artifact to the releases which should allow for
an easier and perhaps more seamless homebrew release process.

[1] https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
  • Loading branch information
abrightwell committed Apr 8, 2024
1 parent 1e40e1e commit bd61feb
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
path: dist

build_macos_amd64:
runs-on: macos-latest
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -94,8 +94,35 @@ jobs:
name: cb_macos_amd64
path: dist

build_macos_arm64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install crystal
run: brew install crystal

- name: Install gon via homebrew for code signing and app notarization
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
- name: Install dependencies
run: shards install

- name: Build
run: |
make release RELEASE=1 STATIC_LIBS=1
- name: Upload release bundle artifact
uses: actions/upload-artifact@v3
with:
name: cb_macos_arm64
path: dist

release:
needs: [build_linux_amd64, build_linux_aarch64, build_macos_amd64]
needs: [build_linux_amd64, build_linux_aarch64, build_macos_amd64, build_macos_arm64]
runs-on: ubuntu-latest
steps:
- name: Determine version
Expand Down

0 comments on commit bd61feb

Please sign in to comment.