Use try-parser in main workflow (#34146)

this allows us to have fail-fast in MQ

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-11-20 16:32:01 +01:00 committed by GitHub
parent a58d6d1fa1
commit c8626985ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,50 +14,46 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build-win: decision:
name: Windows name: Generate Try Configuration
if: ${{ github.event_name != 'pull_request' }} runs-on: ubuntu-20.04
uses: ./.github/workflows/windows.yml outputs:
with: configuration: ${{ steps.configuration.outputs.result }}
unit-tests: true steps:
secrets: inherit - uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
fetch-depth: 1
sparse-checkout: |
python/servo/try_parser.py
sparse-checkout-cone-mode: false
- name: Get Configuration
id: configuration
run: |
{
echo 'result<<EOF'
python ./python/servo/try_parser.py ${{ github.event_name == 'pull_request' && 'linux lint' || 'fail-fast full' }}
echo EOF
} >> $GITHUB_OUTPUT
build-mac: build:
name: Mac needs: ["decision"]
if: ${{ github.event_name != 'pull_request' }} name: ${{ matrix.name }}
uses: ./.github/workflows/mac.yml 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: with:
unit-tests: true workflow: ${{ matrix.workflow }}
secrets: inherit wpt-layout: ${{ matrix.wpt_layout }}
profile: ${{ matrix.profile }}
build-linux: unit-tests: ${{ matrix.unit_tests }}
name: Linux wpt-args: ${{ matrix.wpt_args }}
uses: ./.github/workflows/linux.yml
with:
unit-tests: true
wpt-layout: ${{ github.event_name == 'pull_request' && 'none' || '2020' }}
secrets: inherit
lint:
name: Lint
uses: ./.github/workflows/lint.yml
secrets: inherit
build-android:
name: Android
if: ${{ github.event_name != 'pull_request' }}
uses: ./.github/workflows/android.yml
with:
profile: "release"
secrets: inherit
build-ohos:
name: OpenHarmony
if: ${{ github.event_name != 'pull_request' }}
uses: ./.github/workflows/ohos.yml
with:
profile: "release"
secrets: inherit
build-result: build-result:
name: Result name: Result
@ -65,12 +61,7 @@ jobs:
if: always() if: always()
# needs all build to detect cancellation # needs all build to detect cancellation
needs: needs:
- "build-win" - build
- "build-mac"
- "build-linux"
- "build-android"
- "build-ohos"
- "lint"
steps: steps:
- name: Merge build timings - name: Merge build timings
uses: actions/upload-artifact/merge@v4 uses: actions/upload-artifact/merge@v4