Address review: split macOS Swift checks by CodeQL version

Rather than pinning every macOS job to macOS 15, only run the older CodeQL CLI
versions (which need Xcode 16, and so macOS 15) there. Newer versions, which
support Swift 6.2, run on the latest macOS runner with its default Xcode, so we
keep exercising the common latest-CLI-on-latest-runner combination.

To express this, `sync.ts` now supports an optional per-OS-entry
`codeql-versions` filter, used by `multi-language-autodetect` to send old
versions to `macos-15-xlarge` and new versions to `macos-latest-xlarge`.

`swift-custom-build` only runs `linked`/`default`/`nightly`, which all support
Swift 6.2, so it no longer needs the Xcode 16 step or a macOS 15 pin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henry Mercer
2026-06-23 16:39:54 +01:00
parent b9c90effa0
commit e054b4b848
5 changed files with 46 additions and 23 deletions

View File

@@ -81,19 +81,19 @@ jobs:
version: stable-v2.23.9
- os: ubuntu-latest
version: stable-v2.24.3
- os: macos-15-xlarge
- os: macos-latest-xlarge
version: stable-v2.24.3
- os: ubuntu-latest
version: default
- os: macos-15-xlarge
- os: macos-latest-xlarge
version: default
- os: ubuntu-latest
version: linked
- os: macos-15-xlarge
- os: macos-latest-xlarge
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: macos-15-xlarge
- os: macos-latest-xlarge
version: nightly-latest
name: Multi-language repository
if: github.triggering_actor != 'dependabot[bot]'
@@ -130,7 +130,8 @@ jobs:
python-version: '3.13'
- name: Use Xcode 16
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
# Only the older CodeQL CLI versions need Xcode 16, and these run on macOS 15.
if: matrix.os == 'macos-15-xlarge'
run: sudo xcode-select -s "/Applications/Xcode_16.app"
- uses: ./../action/init

View File

@@ -59,11 +59,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-15
- os: macos-latest
version: linked
- os: macos-15
- os: macos-latest
version: default
- os: macos-15
- os: macos-latest
version: nightly-latest
name: Swift analysis using a custom build command
if: github.triggering_actor != 'dependabot[bot]'
@@ -91,9 +91,6 @@ jobs:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Use Xcode 16
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app"
- uses: ./../action/init
id: init
with: