-
-
Notifications
You must be signed in to change notification settings - Fork 1
126 lines (116 loc) · 4.09 KB
/
ci.yml
File metadata and controls
126 lines (116 loc) · 4.09 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
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
permissions:
contents: read
jobs:
change-detection:
name: 🔍 Change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
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]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"
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@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
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@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
with:
enable-ty: true
enable-mypy: false
setup-mlir: true
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"
build-sdist:
name: 🚀 CD (sdist)
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
build-wheel:
name: 🚀 CD (wheel)
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]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"
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@b59d15aa4f266e713afad51e132bde6e3a28a6b3 # v1.18.1
with:
clang-version: 21
build-project: true
files-changed-only: true
setup-python: true
install-pkgs: "pennylane-catalyst==0.14.1"
cpp-linter-extra-args: "-std=c++20"
setup-mlir: true
llvm-version: "113f01aa82d055410f22a9d03b3468fa68600589"
permissions:
contents: read
pull-requests: write
# this job does nothing and is only used for branch protection
required-checks-pass:
name: 🚦 Check
if: always()
permissions:
contents: read
needs:
- change-detection
- python-coverage
- python-tests
- python-linter
- build-sdist
- build-wheel
- cpp-linter
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-python-tests)
&& '' || 'python-tests,python-coverage,python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'build-sdist,build-wheel,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-linter)
&& '' || 'cpp-linter,'
}}
jobs: ${{ toJSON(needs) }}