Skip to content

Commit 1543912

Browse files
authored
Auto merge of servo#29980 - mrobinson:splitoff, r=mrobinson
Split the WPT workflow from the Linux one This allows running tests for only one layout system at a time. This was originally part of servo#29950, but was lost in the shuffle. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they improve the CI. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2 parents 801cae3 + 3242ad2 commit 1543912

File tree

3 files changed

+146
-111
lines changed

3 files changed

+146
-111
lines changed

.github/workflows/linux-wpt.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Linux WPT workflow
2+
on:
3+
workflow_call:
4+
inputs:
5+
wpt:
6+
required: false
7+
type: string
8+
layout:
9+
required: true
10+
type: string
11+
12+
env:
13+
RUST_BACKTRACE: 1
14+
SHELL: /bin/bash
15+
16+
jobs:
17+
linux-wpt:
18+
name: Linux WPT Tests ${{ inputs.layout }}
19+
runs-on: ubuntu-20.04
20+
env:
21+
max_chunk_id: 20
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
26+
steps:
27+
- uses: actions/checkout@v3
28+
with:
29+
fetch-depth: 2
30+
- uses: actions/download-artifact@v3
31+
with:
32+
name: release-binary
33+
path: release-binary
34+
- name: unPackage binary
35+
run: tar -xzf release-binary/target.tar.gz
36+
- name: Prep test environment
37+
run: |
38+
python3 -m pip install --upgrade pip virtualenv
39+
sudo apt update
40+
sudo apt install -qy --no-install-recommends libgl1 libssl1.1 libdbus-1-3 libxcb-xfixes0-dev libxcb-shape0-dev libunwind8 libegl1-mesa
41+
wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
42+
sudo apt install ./libffi6_3.2.1-8_amd64.deb
43+
python3 ./mach bootstrap-gstreamer
44+
- name: Fetch upstream changes before testing
45+
if: ${{ inputs.wpt == 'sync' }}
46+
run: |
47+
./etc/ci/update-wpt-checkout fetch-upstream-changes
48+
- name: Run tests
49+
if: ${{ inputs.wpt != 'sync' }}
50+
run: |
51+
python3 ./mach test-wpt --with-${{ inputs.layout }} \
52+
--release --processes $(nproc) --timeout-multiplier 2 \
53+
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
54+
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
55+
--log-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \
56+
--filter-intermittents filtered-test-wpt.${{ matrix.chunk_id }}.json
57+
env:
58+
GITHUB_CONTEXT: ${{ toJson(github) }}
59+
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }}
60+
- name: Run tests (sync)
61+
if: ${{ inputs.wpt == 'sync' }}
62+
run: |
63+
python3 ./mach test-wpt --with-${{ inputs.layout }} \
64+
--release --processes $(nproc) --timeout-multiplier 2 \
65+
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
66+
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
67+
--always-succeed
68+
- name: Archive filtered results
69+
uses: actions/upload-artifact@v3
70+
if: ${{ always() && inputs.wpt != 'sync' }}
71+
with:
72+
name: wpt-filtered-results-linux-${{ inputs.layout }}
73+
path: |
74+
filtered-test-wpt.${{ matrix.chunk_id }}.json
75+
unexpected-test-wpt.${{ matrix.chunk_id }}.log
76+
- name: Archive logs
77+
uses: actions/upload-artifact@v3
78+
if: ${{ failure() && inputs.wpt != 'sync' }}
79+
with:
80+
name: wpt-logs-linux-${{ inputs.layout }}
81+
path: |
82+
test-wpt.${{ matrix.chunk_id }}.log
83+
- name: Archive logs
84+
uses: actions/upload-artifact@v3
85+
if: ${{ inputs.wpt == 'sync' }}
86+
with:
87+
name: wpt-logs-linux-${{ inputs.layout }}
88+
path: |
89+
test-wpt.${{ matrix.chunk_id }}.log
90+
wpt-jsonsummary.${{ matrix.chunk_id }}.log
91+
92+
report-test-results:
93+
name: Reporting test results
94+
runs-on: ubuntu-latest
95+
if: ${{ always() && !cancelled() && (github.ref_name == 'try-wpt' || github.ref_name == 'try-wpt-2020' || inputs.wpt == 'test') }}
96+
needs:
97+
- "linux-wpt"
98+
steps:
99+
- uses: actions/checkout@v3
100+
with:
101+
fetch-depth: 2
102+
- uses: actions/download-artifact@v3
103+
with:
104+
name: wpt-filtered-results-linux-${{ inputs.layout }}
105+
path: wpt-filtered-results-linux
106+
- name: Create aggregated unexpected results
107+
run: |
108+
cat wpt-filtered-results-linux/*.log > unexpected-test-wpt-${{ inputs.layout }}.log
109+
- name: Archive aggregate results
110+
uses: actions/upload-artifact@v3
111+
with:
112+
name: wpt-filtered-results-linux
113+
path: |
114+
unexpected-test-wpt-${{ inputs.layout }}.log
115+
- name: Comment on PR with results
116+
run: |
117+
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-${{ inputs.layout }}" wpt-filtered-results-linux/*.json
118+
env:
119+
GITHUB_CONTEXT: ${{ toJson(github) }}
120+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121+
RESULTS: ${{ toJson(needs.*.result) }}

.github/workflows/linux.yml

Lines changed: 24 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
wpt:
66
required: false
77
type: string
8+
layout:
9+
required: false
10+
type: string
811
unit-tests:
912
required: false
1013
default: false
@@ -23,6 +26,10 @@ on:
2326
required: false
2427
type: choice
2528
options: ["test", "sync"]
29+
layout:
30+
required: false
31+
type: choice
32+
options: ["2013", "2020", "all"]
2633
unit-tests:
2734
required: false
2835
default: false
@@ -106,117 +113,23 @@ jobs:
106113
name: release-binary
107114
path: target.tar.gz
108115

109-
linux-wpt:
110-
if: ${{ github.ref_name == 'try-wpt' || github.ref_name == 'try-wpt-2020' || inputs.wpt }}
111-
name: Linux WPT Tests
112-
runs-on: ubuntu-20.04
116+
linux-wpt-2020:
117+
if: ${{ github.ref_name == 'try-wpt-2020' || inputs.layout == '2020' || inputs.layout == 'all' }}
118+
name: Linux WPT Tests 2020
113119
needs: ["build-linux"]
114-
env:
115-
max_chunk_id: 20
116-
strategy:
117-
fail-fast: false
118-
matrix:
119-
layout: ["layout-2020", "layout-2013"]
120-
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
121-
steps:
122-
- uses: actions/checkout@v3
123-
with:
124-
fetch-depth: 2
125-
- uses: actions/download-artifact@v3
126-
with:
127-
name: release-binary
128-
path: release-binary
129-
- name: unPackage binary
130-
run: tar -xzf release-binary/target.tar.gz
131-
- name: Prep test environment
132-
run: |
133-
python3 -m pip install --upgrade pip virtualenv
134-
sudo apt update
135-
sudo apt install -qy --no-install-recommends libgl1 libssl1.1 libdbus-1-3 libxcb-xfixes0-dev libxcb-shape0-dev libunwind8 libegl1-mesa
136-
wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
137-
sudo apt install ./libffi6_3.2.1-8_amd64.deb
138-
python3 ./mach bootstrap-gstreamer
139-
- name: Fetch upstream changes before testing
140-
if: ${{ inputs.wpt == 'sync' }}
141-
run: |
142-
./etc/ci/update-wpt-checkout fetch-upstream-changes
143-
- name: Run tests
144-
if: ${{ inputs.wpt != 'sync' }}
145-
run: |
146-
python3 ./mach test-wpt --with-${{ matrix.layout }} \
147-
--release --processes $(nproc) --timeout-multiplier 2 \
148-
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
149-
--log-raw test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
150-
--log-raw-unexpected unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
151-
--filter-intermittents filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
152-
env:
153-
GITHUB_CONTEXT: ${{ toJson(github) }}
154-
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }}
155-
- name: Run tests (sync)
156-
if: ${{ inputs.wpt == 'sync' }}
157-
run: |
158-
python3 ./mach test-wpt --with-${{ matrix.layout }} \
159-
--release --processes $(nproc) --timeout-multiplier 2 \
160-
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
161-
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
162-
--always-succeed
163-
- name: Archive filtered results
164-
uses: actions/upload-artifact@v3
165-
if: ${{ always() && inputs.wpt != 'sync' }}
166-
with:
167-
name: wpt-filtered-results-linux
168-
path: |
169-
filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
170-
unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
171-
- name: Archive logs
172-
uses: actions/upload-artifact@v3
173-
if: ${{ failure() && inputs.wpt != 'sync' }}
174-
with:
175-
name: wpt-logs-linux
176-
path: |
177-
test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
178-
- name: Archive logs
179-
uses: actions/upload-artifact@v3
180-
if: ${{ inputs.wpt == 'sync' }}
181-
with:
182-
name: wpt-logs-linux-${{ matrix.layout }}
183-
path: |
184-
test-wpt.${{ matrix.chunk_id }}.log
185-
wpt-jsonsummary.${{ matrix.chunk_id }}.log
120+
uses: ./.github/workflows/linux-wpt.yml
121+
with:
122+
wpt: ${{ inputs.wpt }}
123+
layout: "layout-2020"
186124

187-
report-test-results:
188-
name: Reporting test results
189-
runs-on: ubuntu-latest
190-
if: ${{ always() && !cancelled() && success('build-linux') && (github.ref_name == 'try-wpt' || github.ref_name == 'try-wpt-2020' || inputs.wpt == 'test') }}
191-
needs:
192-
- "linux-wpt"
193-
steps:
194-
- uses: actions/checkout@v3
195-
with:
196-
fetch-depth: 2
197-
- uses: actions/download-artifact@v3
198-
with:
199-
name: wpt-filtered-results-linux
200-
path: wpt-filtered-results-linux
201-
- name: Create aggregated unexpected results
202-
run: |
203-
cat wpt-filtered-results-linux/*-layout-2020.*.log > unexpected-test-wpt-layout-2020.log
204-
cat wpt-filtered-results-linux/*-layout-2013.*.log > unexpected-test-wpt-layout-2013.log
205-
- name: Archive aggregate results
206-
uses: actions/upload-artifact@v3
207-
with:
208-
name: wpt-filtered-results-linux
209-
path: |
210-
unexpected-test-wpt-layout-2020.log
211-
unexpected-test-wpt-layout-2013.log
212-
- name: Comment on PR with results
213-
run: |
214-
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-2020" wpt-filtered-results-linux/*-layout-2020.*.json
215-
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-2013" wpt-filtered-results-linux/*-layout-2013.*.json
216-
env:
217-
GITHUB_CONTEXT: ${{ toJson(github) }}
218-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219-
RESULTS: ${{ toJson(needs.*.result) }}
125+
linux-wpt-2013:
126+
if: ${{ github.ref_name == 'try-wpt' || inputs.layout == '2013' || inputs.layout == 'all' }}
127+
name: Linux WPT Tests 2013
128+
needs: ["build-linux"]
129+
uses: ./.github/workflows/linux-wpt.yml
130+
with:
131+
wpt: ${{ inputs.wpt }}
132+
layout: "layout-2013"
220133

221134
build_result:
222135
name: homu build finished
@@ -225,8 +138,8 @@ jobs:
225138
# needs all build to detect cancellation
226139
needs:
227140
- "build-linux"
228-
- "linux-wpt"
229-
- "report-test-results"
141+
- "linux-wpt-2020"
142+
- "linux-wpt-2013"
230143

231144
steps:
232145
- name: Mark the job as successful

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
uses: ./.github/workflows/linux.yml
5454
with:
5555
wpt: 'test'
56+
layout: 'all'
5657
unit-tests: true
5758

5859
build_result:

0 commit comments

Comments
 (0)