Customizable wpt options and profile in workflows (#30912)

* wpt -> wpt-sync

* Add profile configuration option

* Add wpt (for custom tests selection) to CI

* Renaming of wpt-* options

* fixup! do renames also in scripts

* fixup! profile

* Fix try labels
This commit is contained in:
Samson 2023-12-22 13:49:39 +01:00 committed by GitHub
parent 81f5157522
commit 1f0f50b22b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 105 additions and 61 deletions

View file

@ -18,11 +18,20 @@ on:
type: string
workflow_dispatch:
inputs:
profile:
required: false
default: "release"
type: choice
options: ["release", "debug", "production"]
wpt-tests-to-run:
default: ""
required: false
type: string
platform:
required: false
type: choice
options: ["linux", "windows", "macos", "all"]
layout:
wpt-layout:
required: false
type: choice
options: ["none", "2013", "2020", "all"]
@ -53,13 +62,15 @@ jobs:
// We need to pick defaults if the inputs are not provided. Unprovided inputs
// are empty strings in this template.
let platform = "${{ inputs.platform }}" || "linux";
let layout = "${{ inputs.layout }}" || "none";
let profile = "${{ inputs.profile }}" || "release";
let wpt_layout = "${{ inputs.wpt-layout }}" || "none";
let wpt_tests_to_run = "${{ inputs.wpt-tests-to-run }}" || "";
let unit_tests = Boolean(${{ inputs.unit-tests }})
// Merge queue runs and pushes to `main` should always trigger a full build and test.
if (["push", "merge_group"].includes(context.eventName)) {
platform = "all";
layout = "all";
wpt_layout = "all";
unit_tests = true;
}
@ -70,10 +81,12 @@ jobs:
platforms = [ platform ];
}
let returnValue = {
let returnValue = {
platforms,
layout,
wpt_layout,
unit_tests,
profile,
wpt_tests_to_run,
};
console.log("Using configuration: " + JSON.stringify(returnValue));
@ -85,7 +98,7 @@ jobs:
if: ${{ contains(fromJson(needs.decision.outputs.configuration).platforms, 'windows') }}
uses: ./.github/workflows/windows.yml
with:
profile: "release"
profile: ${{ fromJson(needs.decision.outputs.configuration).profile }}
unit-tests: ${{ fromJson(needs.decision.outputs.configuration).unit_tests }}
secrets: inherit
@ -95,7 +108,8 @@ jobs:
if: ${{ contains(fromJson(needs.decision.outputs.configuration).platforms, 'macos') }}
uses: ./.github/workflows/mac.yml
with:
profile: "release"
wpt-tests-to-run: ${{ fromJson(needs.decision.outputs.configuration).wpt_tests_to_run }}
profile: ${{ fromJson(needs.decision.outputs.configuration).profile }}
unit-tests: ${{ fromJson(needs.decision.outputs.configuration).unit_tests }}
secrets: inherit
@ -105,9 +119,9 @@ jobs:
if: ${{ contains(fromJson(needs.decision.outputs.configuration).platforms, 'linux') }}
uses: ./.github/workflows/linux.yml
with:
profile: "release"
wpt: 'test'
layout: ${{ fromJson(needs.decision.outputs.configuration).layout }}
wpt-tests-to-run: ${{ fromJson(needs.decision.outputs.configuration).wpt_tests_to_run }}
profile: ${{ fromJson(needs.decision.outputs.configuration).profile }}
wpt-layout: ${{ fromJson(needs.decision.outputs.configuration).wpt_layout }}
unit-tests: ${{ fromJson(needs.decision.outputs.configuration).unit_tests }}
secrets: inherit