From e25f1b60b11176ab71e88569179573f4e1f863e8 Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Wed, 9 Oct 2024 19:32:18 -0400 Subject: [PATCH] [CI] Use macos-15 image for test job, implicitly transitioning to Apple 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. --- .github/workflows/test.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fecddeb1ea3..5284188acbd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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 }} @@ -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'