Skip to content

Commit 33406e1

Browse files
committed
Add macOS CI matrix for macos-14, macos-15, and macos-26
Test Metal kernel builds across multiple macOS versions to verify compatibility with the metal3.1 standard (macOS 14+). Use sandbox=relaxed for Nix to support __noChroot builds that access the host Metal toolchain. The separate Metal toolchain download is only needed on macOS 26+. Co-developed-by: Claude Code v2.1.50 (claude-opus-4-6)
1 parent b92aa5e commit 33406e1

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/build_kernel_macos.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,35 @@ on:
99

1010
jobs:
1111
build:
12-
name: Build kernel
13-
runs-on: macos-26
12+
name: Build kernel (${{ matrix.os }})
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: macos-14
19+
xcode: "/Applications/Xcode_15.4.app"
20+
- os: macos-15
21+
xcode: "/Applications/Xcode_16.2.app"
22+
- os: macos-26-xlarge
23+
xcode: "/Applications/Xcode_26.0.app"
1424
steps:
1525
- name: "Select Xcode"
16-
run: sudo xcrun xcode-select -s /Applications/Xcode_26.0.app
26+
run: sudo xcrun xcode-select -s ${{ matrix.xcode }}
1727
- name: "Install Metal Toolchain"
28+
if: matrix.os == 'macos-26-xlarge'
1829
run: xcodebuild -downloadComponent metalToolchain
1930
- uses: actions/checkout@v6
2031
- uses: cachix/install-nix-action@v31
32+
with:
33+
extra_nix_config: |
34+
sandbox = relaxed
2135
- uses: cachix/cachix-action@v16
2236
with:
2337
name: huggingface
2438
#authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2539
# For now we only test that there are no regressions in building macOS
26-
# kernels. Also run tests once we have a macOS runner.
40+
# kernels. Also run tests once we have a macOS runner with GPU access.
2741
- name: Build relu kernel
2842
run: ( cd builder/examples/relu && nix build .\#redistributable.torch29-metal-aarch64-darwin -L )
2943

0 commit comments

Comments
 (0)