diff --git a/pr-checks/sync.ts b/pr-checks/sync.ts index 94454de4b..2a62a3c73 100755 --- a/pr-checks/sync.ts +++ b/pr-checks/sync.ts @@ -156,6 +156,34 @@ function main(): void { workflowInputs = checkSpecification.inputs; } + let matrix: Array> = []; + + for (const version of checkSpecification.versions ?? defaultTestVersions) { + if (version === "latest") { + throw new Error( + 'Did not recognise "version: latest". Did you mean "version: linked"?', + ); + } + + const runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]; + const operatingSystems = checkSpecification.operatingSystems ?? [ + "ubuntu", + ]; + + for (const operatingSystem of operatingSystems) { + const runnerImagesForOs = runnerImages.filter((image) => + image.startsWith(operatingSystem), + ); + + for (const runnerImage of runnerImagesForOs) { + matrix.push({ + os: runnerImage, + version, + }); + } + } + } + let extraGroupName = ""; for (const inputName of Object.keys(workflowInputs)) { extraGroupName += "-${{inputs." + inputName + "}}";