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

Đang mở
#3,978 4 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github-actions, macos, typescript
Lĩnh vực
ci-cd, devops, tooling

Hướng nghiên cứu

Bắt đầu với quy trình tái hiện trong issue và so sánh xcrun metal -v trước và sau github/codeql-action/init@v4 trên một runner macOS 26. Đọc entry point của action init và kiểm tra cách quá trình khởi tạo ảnh hưởng đến việc chọn Xcode hoặc khả năng hiển thị của Metal toolchain. Được xem là hoàn tất khi Metal toolchain của Xcode đã chọn vẫn khả dụng, đồng thời các kiểm tra được hiển thị và bản build biên dịch bằng Metal đều thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
493
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/codeql-action

Tất cả issue của github/codeql-action

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.