Skip to content

Commit

Permalink
[CI] Use macos-15 image for test job, implicitly transitioning to App…
Browse files Browse the repository at this point in the history
…le Silicon

To mitigate our problems with macOS runner rate limiting, switch to the
macos-15 runner image. This means we are implicitly transitioning the test job
to Apple Silicon (macos-13 is x86, macos-15 is Apple Silicon with no x86 option
available outside of paid runners).
This allows us to take advantage of the latest compiler features available in
Xcode 16 (based on LLVM 17), which is not available for macOS 13. Xcode has
good backwards compatibility; based on the macos_minimum_os flag we will
continue to support macOS 13 and later.

Interestingly, the macos-15 build is much faster (~2x based on limited testing),
so this will help avoid having stalled macOS build jobs. This is likely due to
the Apple Silicon CPUs being more performant, although the new compiler version
could also be helping.

The release job continues to use the macos-13/x86 image, so we continue to have
coverage for x86. If this proves to be stable, we can also add an Apple Silicon
release build and decommission the internal arm64 macOS build.
  • Loading branch information
fhanau committed Oct 10, 2024
1 parent 35fec47 commit e25f1b6
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:
fixup:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/fixup.yml
labels:
labels:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/labels.yml
uses: ./.github/workflows/labels.yml
test:
strategy:
matrix:
os:
[
{ name : linux, image : ubuntu-20.04 },
{ name : macOS, image : macos-13 },
{ name : macOS, image : macos-15 },
{ name : windows, image : windows-2022 }
]
config:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
config: { suffix: -debug, bazel-args: --config=debug }
# due to resource constraints, exclude the macOS-debug runner for now. linux-debug and
# linux-asan should provide sufficient coverage for building in the debug configuration.
- os: { name : macOS, image : macos-13 }
- os: { name : macOS, image : macos-15 }
config: { suffix: -debug, bazel-args: --config=debug }
fail-fast: false
runs-on: ${{ matrix.os.image }}
Expand Down Expand Up @@ -103,17 +103,15 @@ jobs:
sed -i -e "s%llvm-symbolizer%/usr/lib/llvm-16/bin/llvm-symbolizer%" .bazelrc
- name: Setup macOS
if: matrix.os.name == 'macOS'
# TODO: We want to symbolize stacks for crashes on CI. Xcode is currently based on LLVM 16
# but the macos-13 image has llvm@15 installed:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
# TODO: We want to symbolize stacks for crashes on CI. Xcode is currently based on LLVM 17
# but the macos-15 image has llvm@18 installed:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
#
# Not enabled because symbolication does not work on workerd macOS builds yet and running
# llvm-symbolizer in the currently broken state causes some tests to time out on the
# runner.
# Use latest available Xcode version – runner still defaults to 15.0.1.
run: |
sudo xcode-select -s "/Applications/Xcode_15.1.app"
# export LLVM_SYMBOLIZER=$(brew --prefix llvm@15)/bin/llvm-symbolizer
# export LLVM_SYMBOLIZER=$(brew --prefix llvm@18)/bin/llvm-symbolizer
# sed -i -e "s%llvm-symbolizer%${LLVM_SYMBOLIZER}%" .bazelrc
- name: Setup Windows
if: matrix.os.name == 'windows'
Expand Down

0 comments on commit e25f1b6

Please sign in to comment.