You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codeql-action/init Makes Metal Toolchain Unavailable on macOS 26 Runners #3978
Swift/iOS builds fail after github/codeql-action/init with Xcode 26 on macOS 26 GitHub-hosted runners when the build needs the Metal toolchain.
The failing build error is:
error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain
Command CompileMetalFile failed with a nonzero exit code
This was originally discussed in actions/runner-images:
jobs:
codeql-metal-repro:
runs-on: macos-26permissions:
contents: readsecurity-events: writesteps:
- uses: actions/checkout@v4
- name: Select Xcodeuses: maxim-lobanov/setup-xcode@v1with:
xcode-version: latest-stable
- name: Check Metal before CodeQL initrun: | xcodebuild -version xcrun --find metal xcrun metal -v
- name: Initialize CodeQLuses: github/codeql-action/init@v4with:
languages: swiftbuild-mode: manual
- name: Check Metal after CodeQL initrun: | xcrun --find metal xcrun metal -v
- name: Buildrun: | # Run the normal xcodebuild command for an iOS app target that compiles Metal files. xcodebuild ...
Expected: xcrun metal -v and the xcodebuild invocation continue to find the selected Xcode’s Metal toolchain after CodeQL initialization.
Actual: after codeql-action/init, xcrun metal -v / CompileMetalFile can fail with “missing Metal Toolchain”, even though the runner image appears to have the toolchain available before CodeQL initialization.
Thanks for opening this issue. My first thought here is that this could be a Rosetta issue. One of the things that the codeql-action/init step does is to initialise the CodeQL tracer which injects itself into certain processes to observe how the project is built. This does not natively support ARM-based architectures, and so runs through Rosetta on macOS. Subsequently, all processes it intercepted then also run under Rosetta. My hypothesis would therefore be that in the example run, Metal is installed for the ARM-based host, but not for the Intel-based process tree that runs after the CodeQL tracer intercepted the command.
I'll pass this on to the team that looks after Swift support in CodeQL who'll know best and whether there's anything we can do on our end to address this.
I investigated this in the context of actions/runner-images#13014, and this also failed on macOS Intel runners, so this is not Rosetta related.
Currently this fails for me already in the "Check Metal before CodeQL init" step, so it looks like there a regression in the runner images which would need be be resolved first.
Activity
mbg commentedon Jun 26, 2026
Hi @PSchmiedmayer 👋🏻
Thanks for opening this issue. My first thought here is that this could be a Rosetta issue. One of the things that the
codeql-action/initstep does is to initialise the CodeQL tracer which injects itself into certain processes to observe how the project is built. This does not natively support ARM-based architectures, and so runs through Rosetta on macOS. Subsequently, all processes it intercepted then also run under Rosetta. My hypothesis would therefore be that in the example run, Metal is installed for the ARM-based host, but not for the Intel-based process tree that runs after the CodeQL tracer intercepted the command.I'll pass this on to the team that looks after Swift support in CodeQL who'll know best and whether there's anything we can do on our end to address this.
PSchmiedmayer commentedon Jun 26, 2026
Thank you @mbg for the quick response; greatly appreciated and thank you for looking into this!
jketema commentedon Jun 29, 2026
I investigated this in the context of actions/runner-images#13014, and this also failed on macOS Intel runners, so this is not Rosetta related.
Currently this fails for me already in the "Check Metal before CodeQL init" step, so it looks like there a regression in the runner images which would need be be resolved first.
PSchmiedmayer commentedon Jul 1, 2026
Thanks @jketema; that's unfortunate, I will report that back to the main issue over in actions/runner-images#13014.