Merge pull request #2350 from github/angelapwen/add-exclude-pr-check-param
PR check generator: add `excludeOsAndVersionCombination`
This commit is contained in:
commit
8723b5be41
10 changed files with 85 additions and 44 deletions
6
.github/workflows/__multi-language-autodetect.yml
generated
vendored
6
.github/workflows/__multi-language-autodetect.yml
generated
vendored
|
|
@ -39,10 +39,16 @@ jobs:
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
name: Multi-language repository
|
name: Multi-language repository
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
6
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
6
.github/workflows/__scaling-reserved-ram.yml
generated
vendored
|
|
@ -39,10 +39,16 @@ jobs:
|
||||||
version: stable-v2.16.6
|
version: stable-v2.16.6
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
name: Scaling reserved RAM
|
name: Scaling reserved RAM
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
6
.github/workflows/__swift-custom-build.yml
generated
vendored
6
.github/workflows/__swift-custom-build.yml
generated
vendored
|
|
@ -29,10 +29,16 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: linked
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: default
|
version: default
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: default
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
|
- os: ubuntu-latest
|
||||||
|
version: nightly-latest
|
||||||
name: Swift analysis using a custom build command
|
name: Swift analysis using a custom build command
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
14
.github/workflows/__unset-environment.yml
generated
vendored
14
.github/workflows/__unset-environment.yml
generated
vendored
|
|
@ -27,17 +27,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos-12
|
- os: ubuntu-latest
|
||||||
version: stable-v2.14.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.15.5
|
|
||||||
- os: macos-latest
|
|
||||||
version: stable-v2.16.6
|
|
||||||
- os: macos-latest
|
|
||||||
version: linked
|
|
||||||
- os: macos-latest
|
|
||||||
version: default
|
version: default
|
||||||
- os: macos-latest
|
- os: ubuntu-latest
|
||||||
|
version: linked
|
||||||
|
- os: ubuntu-latest
|
||||||
version: nightly-latest
|
version: nightly-latest
|
||||||
name: Test unsetting environment variables
|
name: Test unsetting environment variables
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
||||||
12
.github/workflows/debug-artifacts.yml
vendored
12
.github/workflows/debug-artifacts.yml
vendored
|
|
@ -22,12 +22,10 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
# TODO: Once CLI v2.17.4 is available and the platform is switched back to ubuntu,
|
- stable-20230403
|
||||||
# stable-20230403, stable-v2.13.5, and stable-v2.14.6 can be added back to this matrix,
|
- stable-v2.13.5
|
||||||
# and the VERSIONS variable in the bash script below.
|
- stable-v2.14.6
|
||||||
# Prior to CLI v2.15.1, ARM runners were not supported by the build tracer.
|
|
||||||
- stable-v2.15.5
|
- stable-v2.15.5
|
||||||
- stable-v2.16.6
|
|
||||||
- default
|
- default
|
||||||
- linked
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
|
|
@ -35,7 +33,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: macos-latest # TODO: Switch back to ubuntu for `nightly-latest` and `linked` once CLI v2.17.4 is available.
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -73,7 +71,7 @@ jobs:
|
||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-v2.15.5 stable-v2.16.6 default linked nightly-latest"
|
VERSIONS="stable-20230403 stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 default linked nightly-latest"
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for version in $VERSIONS; do
|
for version in $VERSIONS; do
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
name: "Multi-language repository"
|
name: "Multi-language repository"
|
||||||
description: "An end-to-end integration test of a multi-language repository using automatic language detection"
|
description: "An end-to-end integration test of a multi-language repository using automatic language detection"
|
||||||
# TODO: Add ubuntu back for `nightly-latest` and `latest` once CLI v2.17.4 is available.
|
operatingSystems: ["macos", "ubuntu"]
|
||||||
operatingSystems: ["macos"]
|
excludeOsAndVersionCombination: [
|
||||||
|
# Known failure for Swift on Linux before CLI v2.17.4.
|
||||||
|
[ "ubuntu", "stable-20230403" ],
|
||||||
|
[ "ubuntu", "stable-v2.13.5" ],
|
||||||
|
[ "ubuntu", "stable-v2.14.6" ],
|
||||||
|
[ "ubuntu", "stable-v2.15.5" ],
|
||||||
|
[ "ubuntu", "stable-v2.16.6" ],
|
||||||
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
name: "Scaling reserved RAM"
|
name: "Scaling reserved RAM"
|
||||||
description: "An end-to-end integration test of a multi-language repository with the scaling_reserved_ram feature flag enabled"
|
description: "An end-to-end integration test of a multi-language repository with the scaling_reserved_ram feature flag enabled"
|
||||||
# TODO: Add ubuntu back for `nightly-latest` and `latest` once CLI v2.17.4 is available.
|
operatingSystems: ["macos", "ubuntu"]
|
||||||
operatingSystems: ["macos"]
|
excludeOsAndVersionCombination: [
|
||||||
|
# Known failure for Swift on Linux before CLI v2.17.4.
|
||||||
|
[ "ubuntu", "stable-20230403" ],
|
||||||
|
[ "ubuntu", "stable-v2.13.5" ],
|
||||||
|
[ "ubuntu", "stable-v2.14.6" ],
|
||||||
|
[ "ubuntu", "stable-v2.15.5" ],
|
||||||
|
[ "ubuntu", "stable-v2.16.6" ],
|
||||||
|
]
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_SCALING_RESERVED_RAM: true
|
CODEQL_ACTION_SCALING_RESERVED_RAM: true
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
name: "Swift analysis using a custom build command"
|
name: "Swift analysis using a custom build command"
|
||||||
description: "Tests creation of a Swift database using custom build"
|
description: "Tests creation of a Swift database using custom build"
|
||||||
versions: ["linked", "default", "nightly-latest"]
|
versions: ["linked", "default", "nightly-latest"]
|
||||||
# TODO: Add ubuntu back for `nightly-latest` and `latest` once CLI v2.17.4 is available.
|
operatingSystems: ["macos", "ubuntu"]
|
||||||
operatingSystems: ["macos"]
|
|
||||||
env:
|
env:
|
||||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,15 @@
|
||||||
name: "Test unsetting environment variables"
|
name: "Test unsetting environment variables"
|
||||||
description: "An end-to-end integration test that unsets some environment variables"
|
description: "An end-to-end integration test that unsets some environment variables"
|
||||||
# TODO: Switch back to all versions once CLI v2.17.4 is available and running on ubuntu again.
|
operatingSystems: ["ubuntu"]
|
||||||
versions: ["stable-v2.14.6", "stable-v2.15.5", "stable-v2.16.6", "linked", "default", "nightly-latest"]
|
excludeOsAndVersionCombination: [
|
||||||
operatingSystems: ["macos"] # TODO: Switch back to ubuntu for `nightly-latest` and `latest` once CLI v2.17.4 is available.
|
# Known failure for Swift on Linux before CLI v2.17.4.
|
||||||
|
[ "ubuntu", "stable-20230403" ],
|
||||||
|
[ "ubuntu", "stable-v2.13.5" ],
|
||||||
|
[ "ubuntu", "stable-v2.14.6" ],
|
||||||
|
[ "ubuntu", "stable-v2.15.5" ],
|
||||||
|
[ "ubuntu", "stable-v2.16.6" ],
|
||||||
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
id: init
|
id: init
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,12 @@ defaultTestVersions = [
|
||||||
"nightly-latest"
|
"nightly-latest"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def is_os_and_version_excluded(os, version, exclude_params):
|
||||||
|
for exclude_param in exclude_params:
|
||||||
|
if exclude_param[0] == os and exclude_param[1] == version:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
# When updating the ruamel.yaml version here, update the PR check in
|
# When updating the ruamel.yaml version here, update the PR check in
|
||||||
# `.github/workflows/pr-checks.yml` too.
|
# `.github/workflows/pr-checks.yml` too.
|
||||||
header = """# Warning: This file is generated automatically, and should not be modified.
|
header = """# Warning: This file is generated automatically, and should not be modified.
|
||||||
|
|
@ -56,27 +62,32 @@ allJobs = {}
|
||||||
for file in (this_dir / 'checks').glob('*.yml'):
|
for file in (this_dir / 'checks').glob('*.yml'):
|
||||||
with open(file, 'r') as checkStream:
|
with open(file, 'r') as checkStream:
|
||||||
checkSpecification = yaml.load(checkStream)
|
checkSpecification = yaml.load(checkStream)
|
||||||
|
|
||||||
matrix = []
|
matrix = []
|
||||||
|
excludedOsesAndVersions = checkSpecification.get('excludeOsAndVersionCombination', [])
|
||||||
for version in checkSpecification.get('versions', defaultTestVersions):
|
for version in checkSpecification.get('versions', defaultTestVersions):
|
||||||
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
|
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||||
if checkSpecification.get('operatingSystems', None):
|
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu", "macos", "windows"])
|
||||||
runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems']
|
|
||||||
if image.startswith(operatingSystem)]
|
|
||||||
|
|
||||||
for runnerImage in runnerImages:
|
for operatingSystem in operatingSystems:
|
||||||
# Prior to CLI v2.15.1, ARM runners were not supported by the build tracer.
|
runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)]
|
||||||
# "macos-latest" is now an ARM runner, so we run tests on the old CLIs on Intel runners instead.
|
|
||||||
if version in ["stable-20230403", "stable-v2.13.4", "stable-v2.13.5", "stable-v2.14.6"] and runnerImage == "macos-latest":
|
for runnerImage in runnerImagesForOs:
|
||||||
matrix.append({
|
# Skip appending this combination to the matrix if it is explicitly excluded.
|
||||||
'os': "macos-12",
|
if is_os_and_version_excluded(operatingSystem, version, excludedOsesAndVersions):
|
||||||
'version': version
|
continue
|
||||||
})
|
|
||||||
else:
|
# Prior to CLI v2.15.1, ARM runners were not supported by the build tracer.
|
||||||
matrix.append({
|
# "macos-latest" is now an ARM runner, so we run tests on the old CLIs on Intel runners instead.
|
||||||
'os': runnerImage,
|
if version in ["stable-20230403", "stable-v2.13.4", "stable-v2.13.5", "stable-v2.14.6"] and runnerImage == "macos-latest":
|
||||||
'version': version
|
matrix.append({
|
||||||
})
|
'os': "macos-12",
|
||||||
|
'version': version
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
matrix.append({
|
||||||
|
'os': runnerImage,
|
||||||
|
'version': version
|
||||||
|
})
|
||||||
|
|
||||||
useAllPlatformBundle = "false" # Default to false
|
useAllPlatformBundle = "false" # Default to false
|
||||||
if checkSpecification.get('useAllPlatformBundle'):
|
if checkSpecification.get('useAllPlatformBundle'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue