Skip to content

Commit e1dd70d

Browse files
authored
Auto merge of #29201 - delan:ci-mac-wpt, r=<try>
CI: run WPT tests on macOS This patch uncomments and fixes the mac-wpt job in the main workflow, with a few changes: * we downgrade python3 and pip3 to 3.9, because inspect.getargspec was [removed in 3.11](https://docs.python.org/3/whatsnew/3.11.html#removed) * we should apparently move to [inspect.getfullargspec](https://docs.python.org/3/library/inspect.html#inspect.getfullargspec) * we download the real Servo artifact, rather than the fake Servo for testing We also align the rest of the job (other than `--timeout-multiplier`) to be as close as possible to linux-wpt, based on the assumption that linux-wpt is more up to date. This includes: * setting strategy.fail-fast to false * adding a failure() condition to the “Archive logs” step * adding the chunk id to log filenames There are some failing WPT tests, so for now the job is not required to succeed. Example run: <https://github.com/delan/servo/actions/runs/3837530905> --- - [ ] ~~`./mach build -d` does not report any errors~~ - [ ] ~~`./mach test-tidy` does not report any errors~~ - [x] These changes fix #28284 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they affect the CI configuration
2 parents 9a03911 + 2d2668e commit e1dd70d

File tree

1 file changed

+57
-53
lines changed

1 file changed

+57
-53
lines changed

.github/workflows/main.yml

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -169,59 +169,62 @@ jobs:
169169
name: release-binary-macos
170170
path: target.tar.gz
171171

172-
# mac-wpt:
173-
# #needs: build-mac
174-
# runs-on: macos-10.12
175-
# env:
176-
# max_chunk_id: 20
177-
# strategy:
178-
# matrix:
179-
# chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
180-
# steps:
181-
# - uses: actions/checkout@v3
182-
# with:
183-
# fetch-depth: 2
184-
#
185-
# #- name: Download release binary
186-
# # uses: actions/download-artifact@v3
187-
# # with:
188-
# # name: release-binary-macos
189-
#
190-
# - name: Fake build
191-
# run: |
192-
# wget https://joshmatthews.net/release-binary-macos.zip
193-
# unzip release-binary-macos.zip
194-
#
195-
# - name: Prep test environment
196-
# run: |
197-
# brew install gnu-tar
198-
# gtar -xzf target.tar.gz
199-
# python3 -m pip install --upgrade pip virtualenv
200-
# brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile
201-
# - name: Smoketest
202-
# run: python3 ./mach smoketest
203-
# - name: Run tests
204-
# run: |
205-
# python3 ./mach test-wpt \
206-
# --release --processes=3 --timeout-multiplier=8 \
207-
# --total-chunks=${{ env.max_chunk_id }} --this-chunk=${{ matrix.chunk_id }} \
208-
# --log-raw=test-wpt.log \
209-
# --log-servojson=wpt-jsonsummary.log \
210-
# --always-succeed | cat
211-
# python3 ./mach filter-intermittents wpt-jsonsummary.log \
212-
# --log-intermittents=intermittents.log \
213-
# --log-filteredsummary=filtered-wpt-summary.log \
214-
# --tracker-api=default --reporter-api=default
215-
#
216-
# - name: Archive logs
217-
# uses: actions/upload-artifact@v3
218-
# with:
219-
# name: wpt${{ matrix.chunk_id }}-logs-macos
220-
# path: |
221-
# test-wpt.log
222-
# wpt-jsonsummary.log
223-
# filtered-wpt-summary.log
224-
# intermittents.log
172+
mac-wpt:
173+
name: Mac WPT Tests
174+
runs-on: macos-12
175+
needs: ["build-mac"]
176+
env:
177+
max_chunk_id: 20
178+
strategy:
179+
fail-fast: false
180+
matrix:
181+
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
182+
steps:
183+
- uses: actions/checkout@v3
184+
with:
185+
fetch-depth: 2
186+
- uses: actions/download-artifact@v3
187+
with:
188+
name: release-binary-macos
189+
# TODO: Remove this step when the compatibility issue between mozjs and
190+
# Homebrew's Python 3.10 formula (servo/rust-mozjs#559) is fixed
191+
- name: Select Python 3.9
192+
run: |
193+
brew install [email protected]
194+
cd $(dirname $(which python3.9))
195+
rm -f python3 pip3
196+
ln -s python3.9 python3
197+
ln -s pip3.9 pip3
198+
- name: Prep test environment
199+
run: |
200+
gtar -xzf target.tar.gz
201+
python3 -m pip install --upgrade pip virtualenv
202+
brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile
203+
- name: Smoketest
204+
run: python3 ./mach smoketest
205+
- name: Run tests
206+
run: |
207+
python3 ./mach test-wpt \
208+
--release --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
209+
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
210+
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
211+
--log-servojson wpt-jsonsummary.${{ matrix.chunk_id }}.log \
212+
--always-succeed
213+
python3 ./mach filter-intermittents wpt-jsonsummary.${{ matrix.chunk_id }}.log \
214+
--log-intermittents=intermittents.${{ matrix.chunk_id }}.log \
215+
--log-filteredsummary=filtered-wpt-summary.${{ matrix.chunk_id }}.log \
216+
--tracker-api=default --reporter-api=default
217+
218+
- name: Archive logs
219+
uses: actions/upload-artifact@v3
220+
if: ${{ failure() }}
221+
with:
222+
name: wpt${{ matrix.chunk_id }}-logs-macos
223+
path: |
224+
test-wpt.${{ matrix.chunk_id }}.log
225+
wpt-jsonsummary.${{ matrix.chunk_id }}.log
226+
filtered-wpt-summary.${{ matrix.chunk_id }}.log
227+
intermittents.${{ matrix.chunk_id }}.log
225228
226229
build-linux:
227230
name: Build (Linux)
@@ -316,6 +319,7 @@ jobs:
316319
- "build-linux"
317320
- "build-mac"
318321
- "linux-wpt"
322+
# - "mac-wpt"
319323

320324
steps:
321325
- name: Mark the job as successful

0 commit comments

Comments
 (0)