Repository navigation
156 lines (140 loc) · 5.85 KB
/
Copy pathci.yml
File metadata and controls
156 lines (140 loc) · 5.85 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CI
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
schedule:
- cron: '42 8 * * 0,2-6'
- cron: '42 8 * * 1'
- cron: '52 8 * * 1'
- cron: '42 9 * * 1'
- cron: '17 4 * * *'
permissions:
contents: read
defaults:
run:
shell: sh
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
changes:
name: Changes
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
linux: ${{ steps.select.outputs.linux }}
bsd: ${{ steps.select.outputs.bsd }}
macos: ${{ steps.select.outputs.macos }}
other: ${{ steps.select.outputs.other }}
versions: ${{ steps.select.outputs.versions }}
android: ${{ steps.select.outputs.android }}
archive: ${{ steps.select.outputs.archive }}
diagnostics: ${{ steps.select.outputs.diagnostics }}
valgrind: ${{ steps.select.outputs.valgrind }}
interoperability: ${{ steps.select.outputs.interoperability }}
asan: ${{ steps.select.outputs.asan }}
coverage: ${{ steps.select.outputs.coverage }}
clang: ${{ steps.select.outputs.clang }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Select checks
id: select
run: python3 -B -S .github/scripts/changes.py
linux:
name: Linux
needs: changes
if: &linux_selected ${{ needs.changes.outputs.linux == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 8 * * 0,2-6' || github.event.schedule == '42 8 * * 1') }}
uses: ./.github/workflows/linux.yml
with:
ubuntu: &weekly_schedule ${{ github.event_name != 'schedule' || github.event.schedule == '42 8 * * 1' }}
almalinux: &daily_schedule ${{ github.event_name != 'schedule' || github.event.schedule == '42 8 * * 0,2-6' || github.event.schedule == '42 8 * * 1' }}
alpine: *weekly_schedule
bsd:
name: BSD
needs: changes
if: &bsd_selected ${{ needs.changes.outputs.bsd == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 8 * * 1') }}
uses: ./.github/workflows/bsd.yml
macos:
name: macOS
needs: changes
if: &macos_selected ${{ needs.changes.outputs.macos == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 8 * * 0,2-6' || github.event.schedule == '42 8 * * 1') }}
uses: ./.github/workflows/macos.yml
other:
name: Other
needs: changes
if: &other_selected ${{ needs.changes.outputs.other == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 8 * * 0,2-6' || github.event.schedule == '42 8 * * 1') }}
uses: ./.github/workflows/other.yml
with:
cygwin: *daily_schedule
solaris: *weekly_schedule
versions:
name: Versions
needs: changes
if: &versions_selected ${{ needs.changes.outputs.versions == 'true' && (github.event_name != 'schedule' || github.event.schedule == '52 8 * * 1') }}
uses: ./.github/workflows/versions.yml
android:
name: Android
needs: changes
if: &android_selected ${{ needs.changes.outputs.android == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 8 * * 1') }}
uses: ./.github/workflows/android.yml
archive:
name: Archive
needs: changes
if: &archive_selected ${{ needs.changes.outputs.archive == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 8 * * 1') }}
uses: ./.github/workflows/archive.yml
diagnostics:
name: Diagnostics
needs: changes
if: &diagnostics_selected ${{ needs.changes.outputs.diagnostics == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 9 * * 1') }}
uses: ./.github/workflows/diagnostics.yml
with:
lint: ®ular ${{ github.event_name != 'schedule' }}
python_37: *regular
asan: ${{ needs.changes.outputs.asan == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 9 * * 1') }}
coverage: ${{ needs.changes.outputs.coverage == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 9 * * 1') }}
clang_21: ${{ needs.changes.outputs.clang == 'true' && (github.event_name != 'schedule' || github.event.schedule == '42 9 * * 1') }}
valgrind:
name: Valgrind
needs: changes
if: &valgrind_selected ${{ needs.changes.outputs.valgrind == 'true' && (github.event_name != 'schedule' || github.event.schedule == '17 4 * * *') }}
uses: ./.github/workflows/valgrind.yml
interoperability:
name: Interoperability
needs: changes
if: &interoperability_selected ${{ needs.changes.outputs.interoperability == 'true' && github.event_name != 'schedule' }}
uses: ./.github/workflows/interoperability-tests.yml
permissions:
contents: read
actions: read
required:
name: Required
if: always()
needs: [changes, linux, bsd, macos, other, versions, android, archive, diagnostics, valgrind, interoperability]
runs-on: ubuntu-24.04
timeout-minutes: 5
env:
CI_EXPECT_LINUX: *linux_selected
CI_EXPECT_BSD: *bsd_selected
CI_EXPECT_MACOS: *macos_selected
CI_EXPECT_OTHER: *other_selected
CI_EXPECT_VERSIONS: *versions_selected
CI_EXPECT_ANDROID: *android_selected
CI_EXPECT_ARCHIVE: *archive_selected
CI_EXPECT_DIAGNOSTICS: *diagnostics_selected
CI_EXPECT_VALGRIND: *valgrind_selected
CI_EXPECT_INTEROPERABILITY: *interoperability_selected
CI_SELECTIONS: ${{ toJSON(needs.changes.outputs) }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check results
env:
CI_RESULTS: ${{ toJSON(needs) }}
run: python3 -S .github/scripts/check-results.py