Files
servo/.github/workflows/mac-wpt.yml
Euclid Ye c242860f0e ci: Upgrade soon deprecated GitHub Actions (#43173)
I got so many warnings about [Node 20
EOL](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/)
in the [try](https://github.com/servo/servo/actions/runs/22945103342):

> The following actions are running on Node.js 20 and may not work as
expected...

We avoid touching those actions forked from web-platform-tests.

Testing: If this can merge, it is successful.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-11 11:02:42 +00:00

128 lines
4.3 KiB
YAML

---
name: Mac WPT Tests
on:
workflow_call:
inputs:
wpt-args:
default: ""
required: false
type: string
profile:
required: true
type: string
arm:
required: true
type: boolean
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
NAME: ${{ inputs.arm && 'macos-arm64' || 'macos' }}
jobs:
mac-wpt:
name: WPT
runs-on: ${{ inputs.arm && 'macos-15' || 'macos-15-intel' }}
env:
max_chunk_id: 5
strategy:
fail-fast: false
matrix:
chunk_id: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v5
if: github.event_name != 'pull_request_target'
# This is necessary to checkout the pull request if this run was triggered via a
# `pull_request_target` event.
- uses: actions/checkout@v5
if: github.event_name == 'pull_request_target'
with:
ref: refs/pull/${{ github.event.number }}/head
- uses: actions/download-artifact@v8
with:
name: ${{ inputs.profile }}-binary-${{ env.NAME }}
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Prep test environment
timeout-minutes: 60
run: |
gtar -xzf target.tar.gz
./mach bootstrap --yes --skip-lints --skip-nextest
- name: Smoketest
run: ./mach smoketest --profile ${{ inputs.profile }}
- name: Run tests
run: |
mkdir -p wpt-filtered-logs/${{ env.NAME }}
mkdir -p wpt-full-logs/${{ env.NAME }}
./mach test-wpt \
--profile ${{ inputs.profile }} --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw wpt-full-logs/${{ env.NAME }}/${{ matrix.chunk_id }}.log \
--log-raw-stable-unexpected wpt-filtered-logs/${{ env.NAME }}/${{ matrix.chunk_id }}.log \
--filter-intermittents wpt-filtered-logs/${{ env.NAME }}/${{ matrix.chunk_id }}.json
${{ inputs.wpt-args }}
- name: Archive results (filtered)
uses: actions/upload-artifact@v7
if: ${{ always() }}
with:
name: wpt-filtered-logs-${{ env.NAME }}-${{ matrix.chunk_id }}
path: wpt-filtered-logs/*/
if-no-files-found: error
- name: Archive results (full)
uses: actions/upload-artifact@v7
if: ${{ always() }}
with:
name: wpt-full-logs-${{ env.NAME }}-${{ matrix.chunk_id }}
path: wpt-full-logs/*/
if-no-files-found: error
report-test-results:
name: Process WPT Results
runs-on: ubuntu-latest
if: ${{ always() }}
needs: mac-wpt
steps:
- name: Merge logs (filtered)
uses: actions/upload-artifact/merge@v7
with:
name: wpt-filtered-logs-${{ env.NAME }}
pattern: wpt-filtered-logs-${{ env.NAME }}-*
delete-merged: true
- name: Merge logs (full)
uses: actions/upload-artifact/merge@v7
with:
name: wpt-full-logs-${{ env.NAME }}
pattern: wpt-full-logs-${{ env.NAME }}-*
delete-merged: true
- uses: actions/checkout@v5
if: ${{ !cancelled() }}
with:
fetch-depth: 2
- name: Aggregate results
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
run: |
touch stable-unexpected-results.log
cat results/${{ env.NAME }}/*.log > stable-unexpected-results.log || true
- name: Upload aggregated results
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
uses: actions/upload-artifact@v7
with:
name: stable-unexpected-results-${{ env.NAME }}
path: stable-unexpected-results.log
if-no-files-found: error
- uses: actions/download-artifact@v8
if: ${{ !cancelled() }}
with:
name: wpt-filtered-logs-${{ env.NAME }}
path: results
- name: Report results
if: ${{ !cancelled() }}
run: |
etc/ci/report_aggregated_expected_results.py \
--tag="${{ env.NAME }}-wpt" \
results/${{ env.NAME }}/*.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RESULTS: ${{ toJson(needs.*.result) }}