-
Notifications
You must be signed in to change notification settings - Fork 0
199 lines (172 loc) · 4.9 KB
/
Copy pathci.yaml
File metadata and controls
199 lines (172 loc) · 4.9 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
name: CI
on:
pull_request:
push:
branches:
- main
schedule:
# Run every Monday at 00:30 UTC
- cron: "30 0 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
# For pull requests, use PR identifier as group. For main branch, use unique identifier.
# -> PRs cancel in progress runs. Main executions run concurrently.
group: ${{ github.workflow }}-${{ github.ref_name == 'main' && github.run_id || github.ref_name }}
cancel-in-progress: true
jobs:
# Mise cache prepare
mise-cache-macos:
uses: ./.github/workflows/mise-prepare-cache.yaml
with:
runner: macos-15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-mise-root-macos
mise-cache-ubuntu:
uses: ./.github/workflows/mise-prepare-cache.yaml
with:
runner: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-mise-root-ubuntu
# uv cache prepare for aoc-main
uv-cache-aoc-main-macos:
needs: mise-cache-macos
uses: ./.github/workflows/mise-uv-prepare-cache.yaml
with:
directory: aoc-main
runner: macos-15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-uv-aoc-main-macos
uv-cache-aoc-main-ubuntu:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-uv-prepare-cache.yaml
with:
directory: aoc-main
runner: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-uv-aoc-main-ubuntu
# Homebrew cache prepare
homebrew-cache-macos:
uses: ./.github/workflows/homebrew-prepare-cache.yaml
with:
runner: macos-15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-homebrew-macos
homebrew-cache-ubuntu:
uses: ./.github/workflows/homebrew-prepare-cache.yaml
with:
runner: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-homebrew-ubuntu
# Checks for root
check-prettier:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:prettier
check-pyright-repo:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:pyright-repo
check-ruff:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:ruff
check-ruff-format:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:ruff:format
check-shellcheck:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:shellcheck
check-shellcheck-config-enabled-optional-checks:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:shellcheck-config-enabled-optional-checks
check-shellcheck-gha:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:shellcheck-gha
check-shfmt:
needs: mise-cache-ubuntu
uses: ./.github/workflows/mise-task.yaml
with:
directory: .
task: check:shfmt
# CI workflows for projects in the repository
ci-aoc-main:
needs:
- mise-cache-ubuntu
- uv-cache-aoc-main-ubuntu
uses: ./.github/workflows/ci-python-project.yaml
with:
directory: aoc-main
# CI for C++ solvers
ci-solvers-cpp:
needs:
- homebrew-cache-macos
- homebrew-cache-ubuntu
- mise-cache-macos
- mise-cache-ubuntu
- uv-cache-aoc-main-macos
- uv-cache-aoc-main-ubuntu
uses: ./.github/workflows/ci-solvers-cpp.yaml
secrets: inherit
with:
homebrew-downloads-hash-from-prepare-macos: ${{ needs.homebrew-cache-macos.outputs.downloads-hash }}
homebrew-downloads-hash-from-prepare-ubuntu: ${{ needs.homebrew-cache-ubuntu.outputs.downloads-hash }}
# CI for Python solvers
ci-solvers-python:
needs:
- mise-cache-ubuntu
- uv-cache-aoc-main-ubuntu
uses: ./.github/workflows/ci-python-project.yaml
secrets: inherit
with:
directory: solvers/python
# CI for Rust solvers
ci-solvers-rust:
needs:
- mise-cache-macos
- mise-cache-ubuntu
- uv-cache-aoc-main-macos
- uv-cache-aoc-main-ubuntu
uses: ./.github/workflows/ci-solvers-rust.yaml
secrets: inherit
# Check for all green CI
check:
if: always()
needs:
- check-prettier
- check-pyright-repo
- check-ruff
- check-ruff-format
- check-shellcheck
- check-shellcheck-config-enabled-optional-checks
- check-shellcheck-gha
- check-shfmt
- ci-aoc-main
- ci-solvers-cpp
- ci-solvers-python
- ci-solvers-rust
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}