-
Notifications
You must be signed in to change notification settings - Fork 78
81 lines (76 loc) · 2.13 KB
/
main.yml
File metadata and controls
81 lines (76 loc) · 2.13 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build application
on:
push:
pull_request:
merge_group:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: >-
${{ github.ref != 'refs/heads/master' &&
github.event_name != 'merge_group' &&
!startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
jobs:
ci-scope:
runs-on: ubuntu-24.04
outputs:
ppc_tasks: ${{ steps.detect.outputs.ppc_tasks }}
task_scoped: ${{ steps.detect.outputs.task_scoped }}
steps:
- uses: actions/checkout@v6
if: ${{ github.event_name == 'pull_request' }}
with:
fetch-depth: 0
- name: Detect CI task scope
id: detect
env:
EVENT_NAME: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if [ "$EVENT_NAME" != "pull_request" ]; then
echo "ppc_tasks=all" >> "$GITHUB_OUTPUT"
echo "task_scoped=false" >> "$GITHUB_OUTPUT"
echo "PPC_TASKS=all"
exit 0
fi
python3 scripts/detect_ci_task_scope.py \
--base-sha "$BASE_SHA" \
--head-sha "$HEAD_SHA" \
--github-output "$GITHUB_OUTPUT"
pre-commit:
uses: ./.github/workflows/pre-commit.yml
ubuntu:
needs:
- ci-scope
- pre-commit
uses: ./.github/workflows/ubuntu.yml
with:
is_nightly: ${{ github.event_name == 'schedule' }}
ppc_tasks: ${{ needs.ci-scope.outputs.ppc_tasks || 'all' }}
mac:
needs:
- ci-scope
- pre-commit
uses: ./.github/workflows/mac.yml
with:
ppc_tasks: ${{ needs.ci-scope.outputs.ppc_tasks || 'all' }}
windows:
needs:
- ci-scope
- pre-commit
uses: ./.github/workflows/windows.yml
with:
ppc_tasks: ${{ needs.ci-scope.outputs.ppc_tasks || 'all' }}
perf:
needs:
- ubuntu
- mac
- windows
uses: ./.github/workflows/perf.yml
pages:
needs:
- perf
uses: ./.github/workflows/pages.yml