-
-
Notifications
You must be signed in to change notification settings - Fork 11
204 lines (191 loc) · 6.49 KB
/
ci.yml
File metadata and controls
204 lines (191 loc) · 6.49 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
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
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: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
cpp-tests-ubuntu:
name: 🇨 Test 🐧
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [gcc]
config: [Release]
include:
- runs-on: ubuntu-24.04
compiler: gcc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -G Ninja
cpp-tests-macos:
name: 🇨 Test 🍎
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
strategy:
fail-fast: false
matrix:
runs-on: [macos-15, macos-15-intel]
compiler: [clang]
config: [Release]
include:
- runs-on: macos-15
compiler: clang
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -G Ninja -DMQT_CORE_WITH_GMP=ON
cpp-tests-windows:
name: 🇨 Test 🏁
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
strategy:
fail-fast: false
matrix:
runs-on: [windows-2025, windows-11-arm]
compiler: [msvc]
config: [Release]
include:
- runs-on: windows-2025
compiler: msvc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -T ClangCL
cpp-coverage:
name: 🇨 Coverage
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
permissions:
contents: read
id-token: write
cpp-linter:
name: 🇨 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
clang-version: 21
cmake-args: -DBUILD_MQT_QUDITS_BINDINGS=ON
cpp-linter-extra-args: "-std=c++20"
files-changed-only: true
install-pkgs: "nanobind==2.11.0"
setup-python: true
python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
strategy:
fail-fast: false
matrix:
runs-on:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15,
macos-15-intel,
windows-2025,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
runs-on: ${{ matrix.runs-on }}
python-coverage:
name: 🐍 Coverage
needs: [change-detection, python-tests]
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
permissions:
contents: read
id-token: write
python-linter:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
check-stubs: true
build-sdist:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
build-wheel:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
strategy:
fail-fast: false
matrix:
runs-on:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15,
macos-15-intel,
windows-2025,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@afe75175d32177a7291bbb7bd11b3276f60fc810 # v1.17.15
with:
runs-on: ${{ matrix.runs-on }}
# this job does nothing and is only used for branch protection
required-checks-pass:
name: 🚦 Check
if: always()
needs:
- change-detection
- cpp-tests-ubuntu
- cpp-tests-macos
- cpp-tests-windows
- cpp-coverage
- cpp-linter
- python-tests
- python-coverage
- python-linter
- build-sdist
- build-wheel
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
allowed-skips: >-
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests)
&& '' || 'cpp-tests-ubuntu,cpp-tests-macos,cpp-tests-windows,cpp-coverage,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-linter)
&& '' || 'cpp-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-tests,python-coverage,python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'build-sdist,build-wheel'
}}
jobs: ${{ toJSON(needs) }}