`codeql-action/init` Makes Metal Toolchain Unavailable on macOS 26 Runners

オープン
#3,978 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
github-actions, macos, typescript
領域
ci-cd, devops, tooling

調査の方向性

issue の再現ワークフローから始め、macOS 26 runner 上で github/codeql-action/init@v4 の前後に xcrun metal -v を比較します。init action のエントリポイントを読み、初期化によって Xcode の選択または Metal toolchain の可視性がどのように変化するかを調べます。選択された Xcode の Metal toolchain が引き続き利用可能で、表示されたチェックと Metal をコンパイルするビルドが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Description

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:

Reproduction outline
jobs:
  codeql-metal-repro:
    runs-on: macos-26
    permissions:
      contents: read
      security-events: write
    steps:
      - uses: actions/checkout@v4
      - name: Select Xcode
        uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: latest-stable
      - name: Check Metal before CodeQL init
        run: |
          xcodebuild -version
          xcrun --find metal
          xcrun metal -v
      - name: Initialize CodeQL
        uses: github/codeql-action/init@v4
        with:
          languages: swift
          build-mode: manual
      - name: Check Metal after CodeQL init
        run: |
          xcrun --find metal
          xcrun metal -v
      - name: Build
        run: |
          # 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.

Note: Xcode 26 changed Metal Toolchain distribution/visibility, and MacPorts documented extra steps sometimes needed to make the toolchain visible to all users:
https://trac.macports.org/wiki/TahoeProblems#MetaltoolchainisnolongerbundledinXcode

主要言語
TypeScript
スター
1.6k
フォーク
493
平均マージ
1日 13時間
マージ済み PR(30日)
44

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/codeql-action のほかの issue

github/codeql-action の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。