/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/linux-wpt.yml
192 строки
8 KB
Martin Robinson
Use `ci-runners/actions/checkout` consistently (#46725)
23 июл 2026, 12:07
Не верифицирован
23 июл 2026, 12:07
b895d3d
Код
Авторство
О чём код?
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@a05e7e830e3f4d4c71bdc5a38f003f052b72668c 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: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main if: ${{ runner.environment != 'self-hosted' }} with: tool-cache: false large-packages: false swap-storage: false - uses: thejerrybao/setup-swap-space@v1 if: ${{ runner.environment != 'self-hosted' }} with: swap-space-path: /swapfile swap-size-gb: 12 - uses: servo/ci-runners/actions/checkout@a05e7e830e3f4d4c71bdc5a38f003f052b72668c - 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: servo/ci-runners/actions/checkout@a05e7e830e3f4d4c71bdc5a38f003f052b72668c if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }} - 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) }}