mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add `build-args` input in CI and try_parser job definition so we can pass own build args to `./mach build` Testing: There are tests for try parser and I tested CI in my fork. Fixes: partial fix #36823 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
82 lines
2.6 KiB
YAML
82 lines
2.6 KiB
YAML
name: Main
|
|
|
|
on:
|
|
push:
|
|
# Run the entire pipeline for 'main' even though the merge queue already runs checks
|
|
# for every change. This just offers an extra layer of testing and covers the case of
|
|
# random force pushes.
|
|
branches: ["main"]
|
|
pull_request:
|
|
types: ['opened', 'synchronize']
|
|
branches: ["**"]
|
|
merge_group:
|
|
types: [checks_requested]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
decision:
|
|
name: Generate Try Configuration
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
configuration: ${{ steps.configuration.outputs.result }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
sparse-checkout: |
|
|
python/servo/try_parser.py
|
|
.github/actions/setup-python
|
|
.python-version
|
|
sparse-checkout-cone-mode: false
|
|
- name: Setup Python
|
|
uses: ./.github/actions/setup-python
|
|
- name: Get Configuration
|
|
id: configuration
|
|
run: |
|
|
{
|
|
echo 'result<<EOF'
|
|
python ./python/servo/try_parser.py ${{ github.event_name == 'pull_request' && 'linux-unit-tests lint' || github.event_name == 'push' && 'fail-fast full bencher production-bencher' || 'fail-fast full' }}
|
|
echo EOF
|
|
} >> $GITHUB_OUTPUT
|
|
|
|
build:
|
|
needs: ["decision"]
|
|
name: ${{ matrix.name }}
|
|
strategy:
|
|
fail-fast: ${{ fromJson(needs.decision.outputs.configuration).fail_fast }}
|
|
matrix:
|
|
include: ${{ fromJson(needs.decision.outputs.configuration).matrix }}
|
|
# We need to use `dipatch-workflow.yml` because workflows do not support using: ${}
|
|
uses: ./.github/workflows/dispatch-workflow.yml
|
|
secrets: inherit
|
|
with:
|
|
workflow: ${{ matrix.workflow }}
|
|
wpt: ${{ matrix.wpt }}
|
|
profile: ${{ matrix.profile }}
|
|
unit-tests: ${{ matrix.unit_tests }}
|
|
build-libservo: ${{ matrix.build_libservo }}
|
|
wpt-args: ${{ matrix.wpt_args }}
|
|
build-args: ${{ matrix.build_args }}
|
|
number-of-wpt-chunks: ${{ matrix.number_of_wpt_chunks }}
|
|
bencher: ${{ matrix.bencher }}
|
|
|
|
build-result:
|
|
name: Result
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
# needs all build to detect cancellation
|
|
needs:
|
|
- build
|
|
steps:
|
|
- name: Merge build timings
|
|
uses: actions/upload-artifact/merge@v4
|
|
with:
|
|
name: cargo-timings
|
|
pattern: cargo-timings-*
|
|
delete-merged: true
|
|
- name: Success
|
|
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
|
|
run: exit 0
|
|
- name: Failure
|
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
run: exit 1
|