-
-
Notifications
You must be signed in to change notification settings - Fork 0
206 lines (193 loc) · 6.53 KB
/
Copy pathci.yml
File metadata and controls
206 lines (193 loc) · 6.53 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
205
206
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@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
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]
preset: [release]
include:
- runs-on: ubuntu-24.04
compiler: gcc
preset: debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
preset-name: ${{ matrix.preset }}
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-26, macos-26-intel]
compiler: [clang]
preset: [release]
include:
- runs-on: macos-26
compiler: clang
preset: debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
preset-name: ${{ matrix.preset }}
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]
preset: [release-windows]
include:
- runs-on: windows-2025
compiler: msvc
preset: debug-windows
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
preset-name: ${{ matrix.preset }}
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@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
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@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
with:
clang-version: 22
build-project: true
files-changed-only: true
setup-python: true
install-pkgs: "nanobind==2.12.0"
cpp-linter-extra-args: "-std=c++20"
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-26,
macos-26-intel,
windows-2025,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
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@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
permissions:
contents: read
id-token: write
python-linter:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-linter)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
with:
check-stubs: true
enable-ty: true
enable-mypy: false
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@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
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-26,
macos-26-intel,
windows-2025,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@e7f84f39ce2d3b6c5d1d04526b8f94f98e455143 # v2.2.0
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-linter
- build-sdist
- build-wheel
runs-on: ubuntu-latest
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,' || ''
}}
${{
!fromJSON(needs.change-detection.outputs.run-python-linter)
&& 'python-linter,' || ''
}}
${{
!fromJSON(needs.change-detection.outputs.run-cd)
&& 'build-sdist,build-wheel' || ''
}}
jobs: ${{ toJSON(needs) }}