forked from servo/servo
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 1.64 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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:
build-win:
name: Windows
if: ${{ github.event_name != 'pull_request' }}
uses: ./.github/workflows/windows.yml
with:
unit-tests: true
secrets: inherit
build-mac:
name: Mac
if: ${{ github.event_name != 'pull_request' }}
uses: ./.github/workflows/mac.yml
with:
unit-tests: true
secrets: inherit
build-linux:
name: Linux
uses: ./.github/workflows/linux.yml
with:
unit-tests: true
wpt-layout: ${{ github.event_name == 'pull_request' && 'none' || 'all' }}
secrets: inherit
build-android:
name: Android
if: ${{ github.event_name != 'pull_request' }}
uses: ./.github/workflows/android.yml
with:
profile: "release"
secrets: inherit
build-result:
name: Result
runs-on: ubuntu-latest
if: always()
# needs all build to detect cancellation
needs:
- "build-win"
- "build-mac"
- "build-linux"
- "build-android"
steps:
- name: Mark the job as successful
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
run: exit 0
- name: Mark the job as unsuccessful
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1