-
-
Notifications
You must be signed in to change notification settings - Fork 1
140 lines (130 loc) · 4.45 KB
/
Copy pathci.yml
File metadata and controls
140 lines (130 loc) · 4.45 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
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
change-detection:
name: 🔍 Change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.0
permissions:
contents: read
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@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.0
with:
clang-version: 21
build-project: true
files-changed-only: true
setup-python: true
install-pkgs: "pennylane-catalyst==0.15.0"
cpp-linter-extra-args: "-std=c++20"
setup-mlir: true
llvm-version: "8f264586d7521b0e305ca7bb78825aa3382ffef7"
permissions:
contents: read
pull-requests: write
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@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.0
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "8f264586d7521b0e305ca7bb78825aa3382ffef7"
permissions:
contents: read
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@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.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@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.0
with:
enable-ty: true
enable-mypy: false
setup-mlir: true
llvm-version: "8f264586d7521b0e305ca7bb78825aa3382ffef7"
permissions:
contents: read
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@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.0
permissions:
contents: read
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@063c90c8e7e094bfffb73f8436eb55341c1e820f # v2.3.0
with:
runs-on: ${{ matrix.runs-on }}
setup-mlir: true
llvm-version: "8f264586d7521b0e305ca7bb78825aa3382ffef7"
permissions:
contents: read
# this job does nothing and is only used for branch protection
required-checks-pass:
name: 🚦 Check
if: always()
needs:
- change-detection
- cpp-linter
- python-coverage
- python-tests
- python-linter
- build-sdist
- build-wheel
runs-on: ubuntu-slim
permissions:
contents: read
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-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) }}