mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
This change merges http://github.com/servo/media into this repository. It is only used by Servo and version upgrades are complicated by having two repositories. In addition, this avoids the need to refer to individual commit hashes in the Servo `Cargo.toml`. The hope is that merging these two repositories will lead to better code organization / simplification like we have seen with the WebXR support. Initiailly, the idea was that this media support could be shared with the wider Rust ecosystem, but I think that hasn't worked out as planned due to the fact that it is difficult to use the various media packaes outside of the Servo project and the fact that no one seems to be doing this. Some changes were made when importing the code: - The second commit in this PR addresses new clippy warnings from the imported code. - GStreamer Packages are no longer renamed in the media code, so that they are named the same as they are currently in Servo. - Some examples are not ported as they require being run interactively and depend on older version of important libraries like winit. Having these dependencies in the core part of Servo isn't very convenient. Removed examples: - `audio_decoder.rs`: This is meant to be run interactively with a file so isn't very useful for testing. - Depended on winit GUI (`player` subdirectory): - `media_element_source_node.rs` - `play_media_stream.rs` - `simple_player.rs` - `muted_player.rs` - `siple_webrtc.rs`: Depended on `webrtc` library: Testing: This is covered by existing tests. In addition, the job which runs the media examples is added to the unit test workflow. --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com>
194 lines
8.2 KiB
YAML
194 lines
8.2 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@6d88b19dda997f1ce2a11e4c1c34717c2bbcafba
|
|
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@v4
|
|
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
|
|
sudo apt install -y jackd2 libjack-jackd2-0
|
|
- name: Start Dummy Audio Device
|
|
run: jackd -d dummy &
|
|
- 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@v6
|
|
if: ${{ always() }}
|
|
with:
|
|
name: wpt-filtered-logs-linux-${{ matrix.chunk_id }}
|
|
path: wpt-filtered-logs/*/
|
|
- name: Archive results (full)
|
|
uses: actions/upload-artifact@v6
|
|
if: ${{ always() }}
|
|
with:
|
|
name: wpt-full-logs-linux-${{ 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
|
|
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@v4
|
|
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@v4
|
|
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@v6
|
|
with:
|
|
name: stable-unexpected-results-linux
|
|
path: stable-unexpected-results.log
|
|
- 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) }}
|