mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CI: Add number_of_chunks
(#36584)
This allows changing number of chunks used for WPT testing (sometimes useful for WebGPU). Testing: Manual try runs Fixes: #30062 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
5e2d42e944
commit
bd9242acfa
7 changed files with 44 additions and 4 deletions
4
.github/workflows/dispatch-workflow.yml
vendored
4
.github/workflows/dispatch-workflow.yml
vendored
|
@ -14,6 +14,9 @@ on:
|
||||||
wpt:
|
wpt:
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
number-of-wpt-chunks:
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
unit-tests:
|
unit-tests:
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -57,6 +60,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt: ${{ inputs.wpt }}
|
wpt: ${{ inputs.wpt }}
|
||||||
|
number-of-wpt-chunks: ${{ inputs.number-of-wpt-chunks }}
|
||||||
unit-tests: ${{ inputs.unit-tests }}
|
unit-tests: ${{ inputs.unit-tests }}
|
||||||
build-libservo: ${{ inputs.build-libservo }}
|
build-libservo: ${{ inputs.build-libservo }}
|
||||||
wpt-args: ${{ inputs.wpt-args }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
|
|
22
.github/workflows/linux-wpt.yml
vendored
22
.github/workflows/linux-wpt.yml
vendored
|
@ -13,6 +13,10 @@ on:
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
number-of-wpt-chunks:
|
||||||
|
default: 20
|
||||||
|
required: false
|
||||||
|
type: number
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
@ -24,15 +28,25 @@ env:
|
||||||
WPT_ALWAYS_SUCCEED_ARG: "${{ inputs.wpt-sync-from-upstream && '--always-succeed' || '' }}"
|
WPT_ALWAYS_SUCCEED_ARG: "${{ inputs.wpt-sync-from-upstream && '--always-succeed' || '' }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
chunks:
|
||||||
|
name: Generate chunks array
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
outputs:
|
||||||
|
chunks-array: ${{ steps.generate-chunks-array.outputs.result }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/github-script@v7
|
||||||
|
id: generate-chunks-array
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
return Array.from({length: ${{ inputs.number-of-wpt-chunks }}}, (_, i) => i + 1)
|
||||||
linux-wpt:
|
linux-wpt:
|
||||||
name: WPT
|
name: WPT
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
needs: chunks
|
||||||
max_chunk_id: 20
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
chunk_id: ${{ fromJson(needs.chunks.outputs.chunks-array) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
if: github.event_name != 'pull_request_target'
|
if: github.event_name != 'pull_request_target'
|
||||||
|
@ -66,7 +80,7 @@ jobs:
|
||||||
./mach test-wpt \
|
./mach test-wpt \
|
||||||
$WPT_ALWAYS_SUCCEED_ARG \
|
$WPT_ALWAYS_SUCCEED_ARG \
|
||||||
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
|
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
|
||||||
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
--total-chunks ${{ inputs.number-of-wpt-chunks }} --this-chunk ${{ matrix.chunk_id }} \
|
||||||
--log-raw wpt-full-logs/linux/raw/${{ matrix.chunk_id }}.log \
|
--log-raw wpt-full-logs/linux/raw/${{ matrix.chunk_id }}.log \
|
||||||
--log-wptreport wpt-full-logs/linux/wptreport/${{ matrix.chunk_id }}.json \
|
--log-wptreport wpt-full-logs/linux/wptreport/${{ matrix.chunk_id }}.json \
|
||||||
--log-raw-unexpected wpt-filtered-logs/linux/${{ matrix.chunk_id }}.log \
|
--log-raw-unexpected wpt-filtered-logs/linux/${{ matrix.chunk_id }}.log \
|
||||||
|
|
9
.github/workflows/linux.yml
vendored
9
.github/workflows/linux.yml
vendored
|
@ -17,6 +17,10 @@ on:
|
||||||
wpt:
|
wpt:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
number-of-wpt-chunks:
|
||||||
|
default: 20
|
||||||
|
required: false
|
||||||
|
type: number
|
||||||
unit-tests:
|
unit-tests:
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
@ -58,6 +62,10 @@ on:
|
||||||
wpt:
|
wpt:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
number-of-wpt-chunks:
|
||||||
|
default: 20
|
||||||
|
required: false
|
||||||
|
type: number
|
||||||
unit-tests:
|
unit-tests:
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
@ -215,6 +223,7 @@ jobs:
|
||||||
wpt-args: ${{ inputs.wpt-args }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
|
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
|
||||||
|
number-of-wpt-chunks: ${{ inputs. number-of-wpt-chunks }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
bencher:
|
bencher:
|
||||||
|
|
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
|
@ -56,6 +56,7 @@ jobs:
|
||||||
unit-tests: ${{ matrix.unit_tests }}
|
unit-tests: ${{ matrix.unit_tests }}
|
||||||
build-libservo: ${{ matrix.build_libservo }}
|
build-libservo: ${{ matrix.build_libservo }}
|
||||||
wpt-args: ${{ matrix.wpt_args }}
|
wpt-args: ${{ matrix.wpt_args }}
|
||||||
|
number-of-wpt-chunks: ${{ matrix.number_of_wpt_chunks }}
|
||||||
bencher: ${{ matrix.bencher }}
|
bencher: ${{ matrix.bencher }}
|
||||||
|
|
||||||
build-result:
|
build-result:
|
||||||
|
|
1
.github/workflows/try-label.yml
vendored
1
.github/workflows/try-label.yml
vendored
|
@ -128,6 +128,7 @@ jobs:
|
||||||
unit-tests: ${{ matrix.unit_tests }}
|
unit-tests: ${{ matrix.unit_tests }}
|
||||||
build-libservo: ${{ matrix.build_libservo }}
|
build-libservo: ${{ matrix.build_libservo }}
|
||||||
wpt-args: ${{ matrix.wpt_args }}
|
wpt-args: ${{ matrix.wpt_args }}
|
||||||
|
number-of-wpt-chunks: ${{ matrix.number_of_wpt_chunks }}
|
||||||
bencher: ${{ matrix.bencher }}
|
bencher: ${{ matrix.bencher }}
|
||||||
|
|
||||||
results:
|
results:
|
||||||
|
|
1
.github/workflows/try.yml
vendored
1
.github/workflows/try.yml
vendored
|
@ -108,6 +108,7 @@ jobs:
|
||||||
unit-tests: ${{ matrix.unit_tests }}
|
unit-tests: ${{ matrix.unit_tests }}
|
||||||
build-libservo: ${{ matrix.build_libservo }}
|
build-libservo: ${{ matrix.build_libservo }}
|
||||||
wpt-args: ${{ matrix.wpt_args }}
|
wpt-args: ${{ matrix.wpt_args }}
|
||||||
|
number-of-wpt-chunks: ${{ matrix.number_of_wpt_chunks }}
|
||||||
bencher: ${{ matrix.bencher }}
|
bencher: ${{ matrix.bencher }}
|
||||||
|
|
||||||
build-result:
|
build-result:
|
||||||
|
|
|
@ -40,6 +40,7 @@ class JobConfig(object):
|
||||||
build_libservo: bool = False
|
build_libservo: bool = False
|
||||||
bencher: bool = False
|
bencher: bool = False
|
||||||
wpt_args: str = ""
|
wpt_args: str = ""
|
||||||
|
number_of_wpt_chunks: int = 20
|
||||||
# These are the fields that must match in between two JobConfigs for them to be able to be
|
# These are the fields that must match in between two JobConfigs for them to be able to be
|
||||||
# merged. If you modify any of the fields above, make sure to update this line as well.
|
# merged. If you modify any of the fields above, make sure to update this line as well.
|
||||||
merge_compatibility_fields: ClassVar[List[str]] = ['workflow', 'profile', 'wpt_args']
|
merge_compatibility_fields: ClassVar[List[str]] = ['workflow', 'profile', 'wpt_args']
|
||||||
|
@ -55,6 +56,7 @@ class JobConfig(object):
|
||||||
self.unit_tests |= other.unit_tests
|
self.unit_tests |= other.unit_tests
|
||||||
self.build_libservo |= other.build_libservo
|
self.build_libservo |= other.build_libservo
|
||||||
self.bencher |= other.bencher
|
self.bencher |= other.bencher
|
||||||
|
self.number_of_wpt_chunks = max(self.number_of_wpt_chunks, other.number_of_wpt_chunks)
|
||||||
self.update_name()
|
self.update_name()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -201,6 +203,7 @@ class TestParser(unittest.TestCase):
|
||||||
'matrix': [{
|
'matrix': [{
|
||||||
'bencher': False,
|
'bencher': False,
|
||||||
'name': 'Linux (Unit Tests)',
|
'name': 'Linux (Unit Tests)',
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
'profile': 'release',
|
'profile': 'release',
|
||||||
'unit_tests': True,
|
'unit_tests': True,
|
||||||
'build_libservo': False,
|
'build_libservo': False,
|
||||||
|
@ -215,6 +218,7 @@ class TestParser(unittest.TestCase):
|
||||||
{"fail_fast": False, "matrix": [
|
{"fail_fast": False, "matrix": [
|
||||||
{
|
{
|
||||||
"name": "Linux (Unit Tests, WPT, Bencher)",
|
"name": "Linux (Unit Tests, WPT, Bencher)",
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
"workflow": "linux",
|
"workflow": "linux",
|
||||||
"wpt": True,
|
"wpt": True,
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
|
@ -225,6 +229,7 @@ class TestParser(unittest.TestCase):
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MacOS (Unit Tests)",
|
"name": "MacOS (Unit Tests)",
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
"workflow": "macos",
|
"workflow": "macos",
|
||||||
"wpt": False,
|
"wpt": False,
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
|
@ -235,6 +240,7 @@ class TestParser(unittest.TestCase):
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Windows (Unit Tests)",
|
"name": "Windows (Unit Tests)",
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
"workflow": "windows",
|
"workflow": "windows",
|
||||||
"wpt": False,
|
"wpt": False,
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
|
@ -245,6 +251,7 @@ class TestParser(unittest.TestCase):
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Android",
|
"name": "Android",
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
"workflow": "android",
|
"workflow": "android",
|
||||||
"wpt": False,
|
"wpt": False,
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
|
@ -255,6 +262,7 @@ class TestParser(unittest.TestCase):
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OpenHarmony",
|
"name": "OpenHarmony",
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
"workflow": "ohos",
|
"workflow": "ohos",
|
||||||
"wpt": False,
|
"wpt": False,
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
|
@ -265,6 +273,7 @@ class TestParser(unittest.TestCase):
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Lint",
|
"name": "Lint",
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
"workflow": "lint",
|
"workflow": "lint",
|
||||||
"wpt": False,
|
"wpt": False,
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
|
@ -280,6 +289,7 @@ class TestParser(unittest.TestCase):
|
||||||
'matrix': [{
|
'matrix': [{
|
||||||
'bencher': False,
|
'bencher': False,
|
||||||
'name': 'Linux (WPT)',
|
'name': 'Linux (WPT)',
|
||||||
|
'number_of_wpt_chunks': 20,
|
||||||
'profile': 'release',
|
'profile': 'release',
|
||||||
'unit_tests': False,
|
'unit_tests': False,
|
||||||
'build_libservo': False,
|
'build_libservo': False,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue