mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
update all occurences (in `servo/.github`) to v5 Testing: None Fixes: #40604 Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
125 lines
4.2 KiB
YAML
125 lines
4.2 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@v4
|
|
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 --skip-lints --skip-nextest
|
|
- name: Smoketest
|
|
run: ./mach smoketest --${{ inputs.profile }}
|
|
- name: Run tests
|
|
run: |
|
|
mkdir -p wpt-filtered-logs/${{ env.NAME }}
|
|
mkdir -p wpt-full-logs/${{ env.NAME }}
|
|
./mach test-wpt \
|
|
--${{ 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@v4
|
|
if: ${{ always() }}
|
|
with:
|
|
name: wpt-filtered-logs-${{ env.NAME }}-${{ matrix.chunk_id }}
|
|
path: wpt-filtered-logs/*/
|
|
- name: Archive results (full)
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{ always() }}
|
|
with:
|
|
name: wpt-full-logs-${{ env.NAME }}-${{ matrix.chunk_id }}
|
|
path: wpt-full-logs/*/
|
|
|
|
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@v4
|
|
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@v4
|
|
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@v4
|
|
with:
|
|
name: stable-unexpected-results-${{ env.NAME }}
|
|
path: stable-unexpected-results.log
|
|
- uses: actions/download-artifact@v4
|
|
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) }}
|