mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
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:
@@ -54,6 +54,12 @@ type OperatingSystem =
|
||||
os: OperatingSystemIdentifier;
|
||||
/** Optional runner image label. */
|
||||
"runner-image"?: string;
|
||||
/**
|
||||
* Optional CodeQL versions to run on this entry. If specified, only these versions are
|
||||
* tested on this runner image. This allows running different runner images for different
|
||||
* CodeQL versions of the same OS.
|
||||
*/
|
||||
"codeql-versions"?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -379,6 +385,15 @@ function generateJobMatrix(
|
||||
continue;
|
||||
}
|
||||
|
||||
// If this OS entry restricts itself to specific CodeQL versions, skip other versions.
|
||||
const entryVersions =
|
||||
typeof operatingSystemConfig === "string"
|
||||
? undefined
|
||||
: operatingSystemConfig["codeql-versions"];
|
||||
if (entryVersions && !entryVersions.includes(version)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const runnerImagesForOs =
|
||||
typeof operatingSystemConfig === "string" ||
|
||||
operatingSystemConfig["runner-image"] === undefined
|
||||
|
||||
Reference in New Issue
Block a user