-
Notifications
You must be signed in to change notification settings - Fork 26
253 lines (241 loc) · 8.89 KB
/
ci.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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
change-detection:
name: 🔍 Change
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
cpp-tests:
name: 🇨 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
# Runs to enable
enable-ubuntu2404-gcc-release: true
enable-ubuntu2404-arm-gcc-release: true
enable-macos13-clang-release: true
enable-macos14-clang-release: true
enable-windows2022-msvc-release: true
# Runs to disable
enable-ubuntu2404-gcc-debug: false
enable-ubuntu2404-clang-release: false
enable-ubuntu2404-clang-debug: false
enable-ubuntu2204-gcc-release: false
enable-ubuntu2204-gcc-debug: false
enable-ubuntu2204-clang-release: false
enable-ubuntu2204-clang-debug: false
enable-ubuntu2404-arm-gcc-debug: false
enable-ubuntu2404-arm-clang-release: false
enable-ubuntu2404-arm-clang-debug: false
enable-ubuntu2204-arm-gcc-release: false
enable-ubuntu2204-arm-gcc-debug: false
enable-ubuntu2204-arm-clang-release: false
enable-ubuntu2204-arm-clang-debug: false
enable-macos13-clang-debug: false
enable-macos13-gcc-release: false
enable-macos13-gcc-debug: false
enable-macos14-clang-debug: false
enable-macos14-gcc-release: false
enable-macos14-gcc-debug: false
enable-macos15-clang-release: false
enable-macos15-clang-debug: false
enable-macos15-gcc-release: false
enable-macos15-gcc-debug: false
enable-windows2022-msvc-debug: false
enable-windows2022-clang-release: false
enable-windows2022-clang-debug: false
enable-windows2025-msvc-release: false
enable-windows2025-msvc-debug: false
enable-windows2025-clang-release: false
enable-windows2025-clang-debug: false
# General settings
setup-z3: true
# run extensive C++ tests whenever this is on a PR and the PR has the `extensive-cpp-ci` label
cpp-tests-extensive:
name: 🇨 Test (Extensive)
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
# Runs to enable
enable-ubuntu2404-gcc-debug: true
enable-ubuntu2404-clang-release: true
enable-ubuntu2404-clang-debug: true
enable-ubuntu2204-gcc-release: true
enable-ubuntu2204-gcc-debug: true
enable-ubuntu2204-clang-release: true
enable-ubuntu2204-clang-debug: true
enable-ubuntu2404-arm-gcc-debug: true
enable-ubuntu2404-arm-clang-release: true
enable-ubuntu2404-arm-clang-debug: true
enable-ubuntu2204-arm-gcc-release: true
enable-ubuntu2204-arm-gcc-debug: true
enable-ubuntu2204-arm-clang-release: true
enable-ubuntu2204-arm-clang-debug: true
enable-macos13-clang-debug: true
enable-macos13-gcc-release: true
enable-macos13-gcc-debug: true
enable-macos14-clang-debug: true
enable-macos14-gcc-release: true
enable-macos14-gcc-debug: true
enable-macos15-clang-release: true
enable-macos15-clang-debug: true
enable-macos15-gcc-release: true
enable-macos15-gcc-debug: true
enable-windows2022-msvc-debug: true
enable-windows2022-clang-release: true
enable-windows2022-clang-debug: true
enable-windows2025-msvc-release: true
enable-windows2025-msvc-debug: true
enable-windows2025-clang-release: true
enable-windows2025-clang-debug: true
# Runs to disable (these are already enabled in the non-extensive run)
enable-ubuntu2404-gcc-release: false
enable-ubuntu2404-arm-gcc-release: false
enable-macos13-clang-release: false
enable-macos14-clang-release: false
enable-windows2022-msvc-release: false
# General settings
setup-z3: true
cpp-coverage:
name: 🇨 Coverage
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
setup-z3: true
cpp-linter:
name: 🇨 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
setup-z3: true
# run extensive Python tests whenever this is on a PR and the PR has the `extensive-python-ci` label
python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
# Runs to enable
enable-ubuntu2404: true
enable-ubuntu2404-arm: true
enable-macos13: true
enable-macos14: true
enable-windows2022: true
# Runs to disable
enable-ubuntu2204: false
enable-ubuntu2204-arm: false
enable-macos15: false
enable-windows2025: false
# General settings
setup-z3: true
python-tests-extensive:
name: 🐍 Test (Extensive)
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci')
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
# Runs to enable
enable-ubuntu2204: true
enable-ubuntu2204-arm: true
enable-macos15: true
enable-windows2025: true
# Runs to disable (these are already enabled in the non-extensive run)
enable-ubuntu2404: false
enable-ubuntu2404-arm: false
enable-macos13: false
enable-macos14: false
enable-windows2022: false
# General settings
setup-z3: true
python-linter:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
setup-z3: true
code-ql:
name: 📝 CodeQL
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-code-ql)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
setup-z3: true
cd:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]
with:
setup-z3: true
# 4.13.0 has incorrectly tagged manylinux wheels
z3-version: 4.12.6
required-checks-pass: # This job does nothing and is only used for branch protection
name: 🚦 Check
if: always()
needs:
- change-detection
- cpp-tests
- cpp-tests-extensive
- cpp-coverage
- cpp-linter
- python-tests
- python-tests-extensive
- python-linter
- code-ql
- cd
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: >-
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests)
&& '' || 'cpp-tests,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
&& '' || 'cpp-tests-extensive,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests)
&& '' || 'cpp-coverage,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-linter)
&& '' || 'cpp-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-tests,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci')
&& '' || 'python-tests-extensive,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-code-ql)
&& '' || 'code-ql,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'cd,'
}}
jobs: ${{ toJSON(needs) }}