[PR #3824] [CLOSED] [Other] CI: build Metal with an explicit macOS 26 SDK #4796

Closed
opened 2026-11-07 15:39:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3824
Author: @i-Vladimir-i
Created: 10/23/2026
Status: ❌ Closed

Base: main ← Head: codex/metal-ci-sdk26


📝 Commits (1)

  • 799d1bf [Codex]: select an explicit macOS 26 SDK for Metal CI

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 .github/workflows/metal-build.yml (+12 -1)

📄 Description

Problem and result

The Metal compile/link job selects macos-14 and currently uses Xcode 15.4. On #2492 at
53b7f352c702a1fa144b7b4d1260f858b6fdce62, it fails before linking because the SDK does not declare
MTLGPUFamilyMetal4, MTLCompileOptions.mathMode, MTLMathModeFast or MTLMathModeSafe.
Observed job.
The failing runtime source, Metal tree and workflow are byte-identical to main
5c8dd322528cc84f68f461ad54a506b9da8fa8d4; the padding PR changes none of them.

This candidate gives the existing CI build an SDK that declares the APIs it uses. It does not change engine
source, user setup, supported runtime versions, runtime defaults, kernels or the padding PR.
The first Metal CI run on this exact head
successfully configured, compiled and linked the full strata target. This is compile/link evidence, not GPU execution.

Related: #2492, #2388 and #2987. The last two are existing, tracker-reset-closed proposals from nullspeech
for older-SDK compilation and runtime shader compatibility; neither is merged. This is not a replacement
for those proposals and does not claim to fix source builds or prompt kernels on older SDKs.
New evidence about that separate compatibility problem belongs in those original threads.

Keep this CI prerequisite separate from the gfx12 padding PR under CONTRIBUTING's one-problem-per-PR rule.
Use macos-15 and explicitly select /Applications/Xcode_26.0.1.app/Contents/Developer with DEVELOPER_DIR.
Changing the runner label alone is insufficient: its documented default is Xcode 16.4 / SDK 15.5.
Add an early toolchain/version check, then run the unchanged pinned dependency, configure and engine-link steps.

GitHub's macOS 15 arm64 image inventory
lists Xcode 26.0.1 and macOS SDK 26.0. Image contents can change; a missing pin must fail rather than silently
fall back to an older SDK. No third-party toolchain-selection action or new permission is needed.

Validation

Tested commit: 799d1bf316b5826b1c5a4f5696c1720598dc320b, based on main
5c8dd322528cc84f68f461ad54a506b9da8fa8d4; single-file workflow diff, 12 insertions / 1 deletion.
Development host: Linux 6.8.0-147, Python 3.12.3, no Apple SDK or macOS runner available.

Passed:

  • Real GitHub Metal CI on this exact commit: SUCCESS, 1m42s, macos-15-arm64 image 20260907.0337.1,
    Xcode 26.0.1 (17A400), macOS SDK 26.0, AppleClang 17.0.0.17000319.
    The unchanged configure and cmake --build build-metal --target strata steps passed;
    the log includes [82/83] Linking CXX executable strata.
  • python validate_workflow.py: 7 unittest cases, no failures/errors/skips, exit 0; repeated on the exact
    committed head above (Python 3.12.3, 0.051 s).
    This is an external development validation script, not an Apple-platform test or a proposed engine test.
  • YAML parsing, bash -n for every run step, preservation of all other workflow fields, pins, permissions,
    path filters, timeouts, configure/link commands; the preflight runs before dependency installation/downloads.
  • Execute the actual preflight Bash with explicitly synthetic xcodebuild/xcrun fixtures: SDK 14.5/15.5/25.0,
    malformed and empty responses fail; SDK 26.0/26.2/27.0 pass. Xcode/SDK-query failures propagate immediately.
  • git diff --check, exit 0. The patch applies cleanly to #2492 with git apply --check.
  • On unchanged #2492's existing HIP and CUDA builds: host grid_pad_test 1/1 each, exit 0.
    These are bounds/rules tests, not new builds or GPU execution, and do not validate the Metal fix.

Failed:

  • The linked original GitHub compile fails with the four missing declarations above.
  • An isolated Objective-C++ compiler probe also rejects an undeclared identifier inside @available.
    This is an expected negative control of language behavior, not reproduction using Apple's SDK on Linux.

Not run:

  • A separate clean-main baseline on macOS; the before evidence is the linked #2492 failure with byte-identical
    Metal source/workflow, not a second newly run main job.
  • Any Metal shader compilation, Apple GPU execution, inference or performance measurement.
  • New CUDA/HIP/SYCL builds for this workflow-only change; their source is unchanged.

Limits and targeted help

This was opened as a Draft with a request for a real macOS compile/link check. That check has now passed in
the first CI run linked above, and this PR is now ready for review.
Please review the CI toolchain choice and the separate older-SDK discussions. Apple runtime/shader validation
remains unrun and is not established by this compile/link job.
Once the CI fix lands in main, #2492 can take updated main and run its actual Metal check again.
Do not interpret an SDK update for this compile-only job as a new minimum macOS runtime policy.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3824 **Author:** [@i-Vladimir-i](https://github.com/i-Vladimir-i) **Created:** 10/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/metal-ci-sdk26` --- ### 📝 Commits (1) - [`799d1bf`](https://github.com/Niko1221/Strata/commit/799d1bf316b5826b1c5a4f5696c1720598dc320b) [Codex]: select an explicit macOS 26 SDK for Metal CI ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/metal-build.yml` (+12 -1) </details> ### 📄 Description ## Problem and result The Metal compile/link job selects `macos-14` and currently uses Xcode 15.4. On #2492 at `53b7f352c702a1fa144b7b4d1260f858b6fdce62`, it fails before linking because the SDK does not declare `MTLGPUFamilyMetal4`, `MTLCompileOptions.mathMode`, `MTLMathModeFast` or `MTLMathModeSafe`. [Observed job](https://github.com/Niko1221/Strata/actions/runs/39933380331/job/120346891660). The failing runtime source, Metal tree and workflow are byte-identical to main `5c8dd322528cc84f68f461ad54a506b9da8fa8d4`; the padding PR changes none of them. This candidate gives the existing CI build an SDK that declares the APIs it uses. It does not change engine source, user setup, supported runtime versions, runtime defaults, kernels or the padding PR. The first [Metal CI run on this exact head](https://github.com/Niko1221/Strata/actions/runs/39948827631/job/120398010010) successfully configured, compiled and linked the full `strata` target. This is compile/link evidence, not GPU execution. ## Related discussion and approach Related: #2492, #2388 and #2987. The last two are existing, tracker-reset-closed proposals from nullspeech for older-SDK compilation and runtime shader compatibility; neither is merged. This is not a replacement for those proposals and does not claim to fix source builds or prompt kernels on older SDKs. New evidence about that separate compatibility problem belongs in those original threads. Keep this CI prerequisite separate from the gfx12 padding PR under CONTRIBUTING's one-problem-per-PR rule. Use `macos-15` and explicitly select `/Applications/Xcode_26.0.1.app/Contents/Developer` with `DEVELOPER_DIR`. Changing the runner label alone is insufficient: its documented default is Xcode 16.4 / SDK 15.5. Add an early toolchain/version check, then run the unchanged pinned dependency, configure and engine-link steps. [GitHub's macOS 15 arm64 image inventory](https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md) lists Xcode 26.0.1 and macOS SDK 26.0. Image contents can change; a missing pin must fail rather than silently fall back to an older SDK. No third-party toolchain-selection action or new permission is needed. ## Validation Tested commit: `799d1bf316b5826b1c5a4f5696c1720598dc320b`, based on main `5c8dd322528cc84f68f461ad54a506b9da8fa8d4`; single-file workflow diff, 12 insertions / 1 deletion. Development host: Linux 6.8.0-147, Python 3.12.3, no Apple SDK or macOS runner available. Passed: - Real GitHub Metal CI on this exact commit: **SUCCESS**, 1m42s, macos-15-arm64 image 20260907.0337.1, Xcode 26.0.1 (17A400), macOS SDK 26.0, AppleClang 17.0.0.17000319. The unchanged configure and `cmake --build build-metal --target strata` steps passed; the log includes `[82/83] Linking CXX executable strata`. - `python validate_workflow.py`: 7 unittest cases, no failures/errors/skips, exit 0; repeated on the exact committed head above (Python 3.12.3, 0.051 s). This is an external development validation script, not an Apple-platform test or a proposed engine test. - YAML parsing, `bash -n` for every run step, preservation of all other workflow fields, pins, permissions, path filters, timeouts, configure/link commands; the preflight runs before dependency installation/downloads. - Execute the actual preflight Bash with explicitly synthetic `xcodebuild`/`xcrun` fixtures: SDK 14.5/15.5/25.0, malformed and empty responses fail; SDK 26.0/26.2/27.0 pass. Xcode/SDK-query failures propagate immediately. - `git diff --check`, exit 0. The patch applies cleanly to #2492 with `git apply --check`. - On unchanged #2492's existing HIP and CUDA builds: host `grid_pad_test` 1/1 each, exit 0. These are bounds/rules tests, not new builds or GPU execution, and do not validate the Metal fix. Failed: - The linked original GitHub compile fails with the four missing declarations above. - An isolated Objective-C++ compiler probe also rejects an undeclared identifier inside `@available`. This is an expected negative control of language behavior, not reproduction using Apple's SDK on Linux. Not run: - A separate clean-main baseline on macOS; the before evidence is the linked #2492 failure with byte-identical Metal source/workflow, not a second newly run main job. - Any Metal shader compilation, Apple GPU execution, inference or performance measurement. - New CUDA/HIP/SYCL builds for this workflow-only change; their source is unchanged. ## Limits and targeted help This was opened as a Draft with a request for a real macOS compile/link check. That check has now passed in the first CI run linked above, and this PR is now ready for review. Please review the CI toolchain choice and the separate older-SDK discussions. Apple runtime/shader validation remains unrun and is not established by this compile/link job. Once the CI fix lands in main, #2492 can take updated main and run its actual Metal check again. Do not interpret an SDK update for this compile-only job as a new minimum macOS runtime policy. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:39:07 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4796
No description provided.