mirror of
https://github.com/servo/servo.git
synced 2025-06-04 07:35:36 +00:00
This allows us to use `uv` for: 1. Installing a pinned Python version 2. Installing the dependency packages using `uv`'s pip compatible interface. 4. Bootstrapping `mach` without a Python installion on the host, using `uv run` This change also introduces a new 'composite' GitHub action to setup python in the different CI workflows. There is no support for externally managed python installations and virtual environments. These could be added in the future. Fixes #34095, #34547 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
130 lines
5.3 KiB
YAML
130 lines
5.3 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
|
|
wpt-layout:
|
|
required: true
|
|
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_LAYOUT_ARG: "${{ inputs.wpt-layout == 'layout-2013' && '--legacy-layout' || '' }}"
|
|
WPT_ALWAYS_SUCCEED_ARG: "${{ inputs.wpt-sync-from-upstream && '--always-succeed' || '' }}"
|
|
|
|
jobs:
|
|
linux-wpt:
|
|
name: WPT ${{ inputs.wpt-layout }}
|
|
runs-on: ubuntu-22.04
|
|
env:
|
|
max_chunk_id: 20
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
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@v4
|
|
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-linux
|
|
path: ${{ inputs.profile }}-binary-linux
|
|
- name: unPackage binary
|
|
run: tar -xzf ${{ inputs.profile }}-binary-linux/target.tar.gz
|
|
- name: Setup Python
|
|
uses: ./.github/actions/setup-python
|
|
- name: Bootstrap dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers
|
|
python3 ./mach bootstrap --skip-lints
|
|
- 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-${{ inputs.wpt-layout }}
|
|
mkdir -p wpt-full-logs/linux-${{ inputs.wpt-layout }}
|
|
python3 ./mach test-wpt \
|
|
$WPT_LAYOUT_ARG \
|
|
$WPT_ALWAYS_SUCCEED_ARG \
|
|
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
|
|
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
|
--log-raw wpt-full-logs/linux-${{ inputs.wpt-layout }}/raw/${{ matrix.chunk_id }}.log \
|
|
--log-wptreport wpt-full-logs/linux-${{ inputs.wpt-layout }}/wptreport/${{ matrix.chunk_id }}.json \
|
|
--log-raw-unexpected wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
|
--filter-intermittents wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json \
|
|
${{ inputs.wpt-args }}
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
- name: Archive results (filtered)
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{ always() }}
|
|
with:
|
|
name: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}-${{ matrix.chunk_id }}
|
|
path: wpt-filtered-logs/*/
|
|
- name: Archive results (full)
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{ always() }}
|
|
with:
|
|
name: wpt-full-logs-linux-${{ inputs.wpt-layout }}-${{ matrix.chunk_id }}
|
|
path: wpt-full-logs/*/
|
|
|
|
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@v4
|
|
with:
|
|
name: wpt-full-logs-linux-${{ inputs.wpt-layout }}
|
|
pattern: wpt-full-logs-linux-${{ inputs.wpt-layout }}-*
|
|
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@v4
|
|
with:
|
|
name: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}
|
|
pattern: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}-*
|
|
delete-merged: true
|
|
- uses: actions/checkout@v4
|
|
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
|
|
- uses: actions/download-artifact@v4
|
|
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
|
|
with:
|
|
name: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}
|
|
path: results
|
|
- name: Report results
|
|
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
|
|
run: |
|
|
etc/ci/report_aggregated_expected_results.py \
|
|
--tag="linux-wpt-${{ inputs.wpt-layout }}" \
|
|
results/linux-${{ inputs.wpt-layout }}/*.json
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
RESULTS: ${{ toJson(needs.*.result) }}
|