Add Layout 2020 support to nightly WPT update

This commit is contained in:
Martin Robinson 2023-03-24 18:12:45 +01:00
parent d8e886a792
commit 95bfad3ac5
2 changed files with 33 additions and 21 deletions

View file

@ -23,16 +23,25 @@ jobs:
python3 -m pip install --upgrade pip virtualenv
sudo apt update
python3 ./mach bootstrap
- name: Release build
- name: Release build (Layout 2013)
run: python3 ./mach build --release
- name: Lockfile check
run: ./etc/ci/lockfile_changed.sh
- name: Package binary
- name: Package binary (Layout 2013)
run: tar -czf target.tar.gz target/release/servo resources
- name: Archive binary
- name: Archive binary (Layout 2013)
uses: actions/upload-artifact@v3
with:
name: release-binary
name: layout-2013-release-binary
path: target.tar.gz
- name: Release build (Layout 2020)
run: python3 ./mach build --release --with-layout-2020
- name: Package binary (Layout 2020)
run: tar -czf target.tar.gz target/release/servo resources
- name: Archive binary (Layout 2020)
uses: actions/upload-artifact@v3
with:
name: layout-2020-release-binary
path: target.tar.gz
linux-wpt:
@ -46,13 +55,14 @@ jobs:
strategy:
matrix:
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
configuration: ["layout-2013", "layout-2020"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/download-artifact@v3
with:
name: release-binary
name: ${{ matrix.configuration }}-release-binary
path: release-binary
- name: unPackage binary
run: tar -xzf release-binary/target.tar.gz
@ -72,16 +82,16 @@ jobs:
python3 ./mach test-wpt \
--release --processes $(nproc) --timeout-multiplier 2 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
--log-servojson wpt-jsonsummary.${{ matrix.chunk_id }}.log \
--log-raw test-wpt.${{ matrix.configuration }}.${{ matrix.chunk_id }}.log \
--log-servojson wpt-jsonsummary.${{ matrix.configuration }}.${{ matrix.chunk_id }}.log \
--always-succeed
- name: Archive logs
uses: actions/upload-artifact@v3
with:
name: wpt-logs-linux
path: |
test-wpt.${{ matrix.chunk_id }}.log
wpt-jsonsummary.${{ matrix.chunk_id }}.log
test-wpt.${{ matrix.configuration }}.${{ matrix.chunk_id }}.log
wpt-jsonsummary.${{ matrix.configuration }}.${{ matrix.chunk_id }}.log
sync:
# This job is only useful when run on upstream servo.

26
etc/ci/wpt-nightly-update.sh Executable file → Normal file
View file

@ -8,22 +8,25 @@ set -o errexit
set -o nounset
set -o pipefail
# Using an existing log file, update the expected test results and amend the
# last commit with the new results.
function unsafe_update_metadata() {
./mach update-wpt "${1}" || return 1
# Hope that any test result changes from layout-2013 are
# also applicable to layout-2020.
./mach update-wpt --layout-2020 "${1}" || return 2
# For a given chunk, use the existing log files to update the expected test
# results and amend the last commit with the new results.
function unsafe_update_metadata_chunk() {
./mach update-wpt \
"wpt-logs-linux/test-wpt.layout-2013.${1}.log" || return 1
./mach update-wpt --layout-2020 \
"wpt-logs-linux/test-wpt.layout-2020.${1}.log" || return 2
# Ensure any new directories or ini files are included in these changes.
git add tests/wpt/metadata tests/wpt/metadata-layout-2020 \
git add tests/wpt/metadata \
tests/wpt/metadata-layout-2020 \
tests/wpt/mozilla/meta || return 3
# Merge all changes with the existing commit.
git commit -a --amend --no-edit || return 3
}
function update_metadata() {
unsafe_update_metadata "${1}" || \
function update_metadata_chunk() {
unsafe_update_metadata_chunk "${1}" || \
{ code="${?}"; cleanup; return "${code}"; }
}
@ -31,8 +34,7 @@ function main() {
for n in $(seq 1 "${MAX_CHUNK_ID}")
do
code=""
update_metadata "wpt-logs-linux/test-wpt.${n}.log" || \
code="${?}"
update_metadata_chunk "${n}" || code="${?}"
if [[ "${code}" != "" ]]; then
return "${code}"
fi