Files
servo/.github/workflows/linux-wpt.yml
Euclid Ye a10434cef4 ci: Bump ci-runners to f0b81b9 and upgrade remaining deprecated Actions (#43244)
This continues #43173, https://github.com/servo/ci-runners/pull/118

There are several warnings that cannot be solved here, and requires
original Action maintainers to take action:
- nick-fields
- KyleMayes/install-llvm
- bencher

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-14 02:08:56 +00:00

194 lines
8.1 KiB
YAML

name: Linux WPT Tests
on:
workflow_call:
inputs:
profile:
required: true
type: string
wpt-args:
default: ""
required: false
type: string
wpt-sync-from-upstream:
default: false
required: false
type: boolean
number-of-wpt-chunks:
default: 20
required: false
type: number
binary-path:
required: true
default: ""
type: string
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
GST_PLUGIN_FEATURE_RANK: pulsesink:NONE,alsasink:NONE,jacksink:NONE,fakesink:MAX
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ !inputs.wpt-sync-from-upstream && secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET || '' }}
INTERMITTENT_TRACKER_DASHBOARD_SECRET_PROD: ${{ !inputs.wpt-sync-from-upstream && secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET_PROD || '' }}
INTERMITTENT_TRACKER_DASHBOARD_SECRET_STAGING: ${{ !inputs.wpt-sync-from-upstream && secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET_STAGING || '' }}
WPT_ALWAYS_SUCCEED_ARG: "${{ inputs.wpt-sync-from-upstream && '--always-succeed' || '' }}"
jobs:
# Runs the underlying job (“workload”) on a self-hosted runner if available,
# with the help of a `runner-select` job and a `runner-timeout` job.
runner-select:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
selected-runner-count: ${{ steps.select.outputs.selected-runner-count }}
selected-runner-indices: ${{ steps.select.outputs.selected-runner-indices }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@f0b81b95522256c64ee207b4236ec71fc23b99a1
with:
GITHUB_TOKEN: ${{ github.token }}
# Before updating the GH action runner image for the nightly job, ensure
# that the system has a glibc version that is compatible with the one
# used by the wpt.fyi runners.
github-hosted-runner-label: ubuntu-22.04
github-hosted-runner-count: ${{ inputs.number-of-wpt-chunks }}
self-hosted-image-name: servo-ubuntu2204-wpt
self-hosted-runner-count: 3
# You can disable self-hosted runners globally by creating a repository variable named
# NO_SELF_HOSTED_RUNNERS with any non-empty value.
# <https://github.com/servo/servo/settings/variables/actions>
NO_SELF_HOSTED_RUNNERS: ${{ vars.NO_SELF_HOSTED_RUNNERS }}
# Any other boolean conditions that disable self-hosted runners go here.
force-github-hosted-runner: true
linux-wpt:
needs:
- runner-select
name: WPT [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
strategy:
fail-fast: false
matrix:
chunk_id: ${{ fromJSON(needs.runner-select.outputs.selected-runner-indices) }}
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-linux
path: ${{ inputs.profile }}-binary-linux
- name: unPackage binary
run: tar -xzf ${{ inputs.profile }}-binary-linux/servo-tech-demo.tar.gz
- name: Setup Python
if: ${{ runner.environment != 'self-hosted' }}
uses: ./.github/actions/setup-python
- name: Change Mirror Priorities
if: ${{ runner.environment != 'self-hosted' }}
uses: ./.github/actions/apt-mirrors
- name: Bootstrap dependencies
timeout-minutes: 30
run: |
sudo apt update
./mach bootstrap --yes --skip-lints --skip-nextest
# FIXME #41043, #41044
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers fonts-noto-cjk fonts-dejavu-extra
# FIXME #35029
sudo apt purge -y fonts-droid-fallback
- name: Sync from upstream WPT
if: ${{ inputs.wpt-sync-from-upstream }}
run: |
./mach update-wpt --sync --patch
- name: Run tests
run: |
mkdir -p wpt-filtered-logs/linux
mkdir -p wpt-full-logs/linux
nproc=$(nproc)
./mach test-wpt \
--bin ${{ inputs.binary-path }} \
$WPT_ALWAYS_SUCCEED_ARG \
--profile ${{ inputs.profile }} --processes $((nproc * ${{ runner.environment == 'self-hosted' && 2 || 1 }})) --timeout-multiplier 2 \
--total-chunks ${{ needs.runner-select.outputs.selected-runner-count }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw wpt-full-logs/linux/raw/${{ matrix.chunk_id }}.log \
--log-wptreport wpt-full-logs/linux/wptreport/${{ matrix.chunk_id }}.json \
--log-raw-stable-unexpected wpt-filtered-logs/linux/${{ matrix.chunk_id }}.log \
--filter-intermittents wpt-filtered-logs/linux/${{ matrix.chunk_id }}.json \
${{ inputs.wpt-args }}
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Archive results (filtered)
uses: actions/upload-artifact@v7
if: ${{ always() }}
with:
name: wpt-filtered-logs-linux-${{ 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-linux-${{ 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: linux-wpt
steps:
- name: Merge logs (full)
uses: actions/upload-artifact/merge@v7
with:
name: wpt-full-logs-linux
pattern: wpt-full-logs-linux-*
delete-merged: true
# This job needs to be last. If no filtered results were uploaded, it will fail, but we want to merge other archives in that case.
- name: Merge logs (filtered)
uses: actions/upload-artifact/merge@v7
with:
name: wpt-filtered-logs-linux
pattern: wpt-filtered-logs-linux-*
delete-merged: true
- uses: actions/checkout@v5
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream && 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: ${{ !cancelled() && !inputs.wpt-sync-from-upstream && github.event_name == 'pull_request_target' }}
with:
ref: refs/pull/${{ github.event.number }}/head
- uses: actions/download-artifact@v8
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
with:
name: wpt-filtered-logs-linux
path: results
- name: Aggregate results
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
run: |
touch stable-unexpected-results.log
cat results/linux/*.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-linux
path: stable-unexpected-results.log
if-no-files-found: error
- name: Report results
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
run: |
etc/ci/report_aggregated_expected_results.py \
--tag="linux-wpt" \
results/linux/*.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RESULTS: ${{ toJson(needs.*.result) }}