Skip to content

Commit c354303

Browse files
committed
ci(release): download Metal Toolchain on macos-26 before mlx-sys build
1 parent a023a15 commit c354303

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ jobs:
7070
with:
7171
xcode-version: latest-stable
7272

73+
# ── Metal Toolchain (the `metal` shader compiler) ─────────────
74+
# Xcode 26 ships the Metal compiler as a *separately downloadable*
75+
# component, and macos-26 runners don't pre-install it. mlx-sys's CMake
76+
# build compiles MLX's Metal kernels into mlx.metallib via the `metal`
77+
# tool, so without this the next step dies with:
78+
# "error: cannot execute tool 'metal' due to missing Metal Toolchain;
79+
# use: xcodebuild -downloadComponent MetalToolchain".
80+
# Idempotent; retry once for the occasionally-flaky asset download.
81+
- name: Download Metal Toolchain
82+
run: |
83+
xcodebuild -downloadComponent MetalToolchain \
84+
|| (sleep 20 && xcodebuild -downloadComponent MetalToolchain)
85+
# Fail fast here (not 10 min into the CMake build) if metal is still absent.
86+
xcrun -f metal
87+
xcrun metal --version || true
88+
7389
# ── Toolchains ────────────────────────────────────────────────
7490
- name: Install Rust toolchain (with matrix target)
7591
uses: dtolnay/rust-toolchain@stable

0 commit comments

Comments
 (0)