mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
There are currently two ways to run try. One is to push to the `try` or `try-*` branches and the other is to trigger a workflow via GitHub comment. This change combines these methods into one workflow. In addition, WPT results are reported together rather than separately and filtered results for all WPT tests are bundled together in the same artifact.
72 lines
No EOL
2.5 KiB
YAML
72 lines
No EOL
2.5 KiB
YAML
---
|
|
name: Mac WPT Tests
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
layout:
|
|
required: true
|
|
type: string
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
SHELL: /bin/bash
|
|
|
|
jobs:
|
|
mac-wpt:
|
|
name: WPT ${{ inputs.layout }}
|
|
runs-on: macos-13
|
|
env:
|
|
max_chunk_id: 5
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
chunk_id: [1, 2, 3, 4, 5]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
if: github.event_name != 'issue_comment'
|
|
with:
|
|
fetch-depth: 2
|
|
# This is necessary to checkout the pull request if this run was triggered
|
|
# via an `issue_comment` action on a pull request.
|
|
- uses: actions/checkout@v3
|
|
if: github.event_name == 'issue_comment'
|
|
with:
|
|
ref: refs/pull/${{ github.event.issue.number }}/head
|
|
fetch-depth: 2
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: release-binary-macos
|
|
- name: Prep test environment
|
|
run: |
|
|
gtar -xzf target.tar.gz
|
|
python3 -m pip install --upgrade pip virtualenv
|
|
python3 ./mach bootstrap
|
|
- name: Smoketest
|
|
run: python3 ./mach smoketest --release
|
|
- name: Run tests
|
|
run: |
|
|
mkdir macos-${{ inputs.layout }}
|
|
python3 ./mach test-wpt --with-${{ inputs.layout }} \
|
|
--release --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
|
|
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
|
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
|
|
--log-raw-unexpected macos-${{ inputs.layout }}/unexpected-test-wpt.${{ matrix.chunk_id }}.log \
|
|
--filter-intermittents macos-${{ inputs.layout }}/filtered-test-wpt.${{ matrix.chunk_id }}.json
|
|
- name: Archive filtered results
|
|
uses: actions/upload-artifact@v3
|
|
if: always()
|
|
with:
|
|
name: wpt-filtered-results-mac-${{ inputs.layout }}
|
|
# The wildcard here ensures that the relative path is preserved in the archive:
|
|
# See https://github.com/actions/upload-artifact/issues/174
|
|
path: |
|
|
./*macos-${{ inputs.layout }}/filtered-test-wpt.${{ matrix.chunk_id }}.json
|
|
./*macos-${{ inputs.layout }}/unexpected-test-wpt.${{ matrix.chunk_id }}.log
|
|
- name: Archive logs
|
|
uses: actions/upload-artifact@v3
|
|
if: failure()
|
|
with:
|
|
name: wpt-logs-mac-${{ inputs.layout }}
|
|
path: |
|
|
test-wpt.${{ matrix.chunk_id }}.log
|
|
filtered-wpt-results.${{ matrix.chunk_id }}.json |