3131 configure :
3232 runs-on : ubuntu-latest
3333 outputs :
34- # 0: PRs without special label
35- # 1: PRs with `merge-ci` label, merge queue checks, master commits
36- # 2: PRs with `release-ci` label, releases (incl. nightlies)
37- check-level : ${{ steps.set-level.outputs.check-level }}
3834 # The build matrix, dynamically generated here
3935 matrix : ${{ steps.set-matrix.outputs.matrix }}
4036 # secondary build jobs that should not block the CI success/merge queue
@@ -110,6 +106,9 @@ jobs:
110106 TAG_NAME="${GITHUB_REF##*/}"
111107 echo "RELEASE_TAG=$TAG_NAME" >> "$GITHUB_OUTPUT"
112108
109+ # 0: PRs without special label
110+ # 1: PRs with `merge-ci` label, merge queue checks, master commits
111+ # 2: PRs with `release-ci` label, releases (incl. nightlies)
113112 - name : Set check level
114113 id : set-level
115114 # We do not use github.event.pull_request.labels.*.name here because
@@ -152,7 +151,8 @@ jobs:
152151 "name": "Linux LLVM",
153152 "os": "ubuntu-latest",
154153 "release": false,
155- "check-level": 2,
154+ "enabled": level >= 2,
155+ "test": true,
156156 "shell": "nix develop .#oldGlibc -c bash -euxo pipefail {0}",
157157 "llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-linux-gnu.tar.zst",
158158 "prepare-llvm": "../script/prepare-llvm-linux.sh lean-llvm*",
@@ -168,14 +168,15 @@ jobs:
168168 "os": "ubuntu-latest",
169169 "release": true,
170170 // Special handling for release jobs. We want:
171- // 1. To run it in PRs so developers get PR toolchains (so secondary is sufficient)
171+ // 1. To run it in PRs so developers get PR toolchains (so secondary without tests is sufficient)
172172 // 2. To skip it in merge queues as it takes longer than the
173173 // Linux lake build and adds little value in the merge queue
174174 // 3. To run it in release (obviously)
175175 // 4. To run it for pushes to master so that pushes to master have a Linux toolchain
176176 // available as an artifact for Grove to use.
177- "check-level": (isPr || isPushToMaster) ? 0 : 2,
178- "secondary": isPr,
177+ "enabled": isPr || level != 1 || isPushToMaster,
178+ "test": level >= 1,
179+ "secondary": level == 0,
179180 "shell": "nix develop .#oldGlibc -c bash -euxo pipefail {0}",
180181 "llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-linux-gnu.tar.zst",
181182 "prepare-llvm": "../script/prepare-llvm-linux.sh lean-llvm*",
@@ -186,10 +187,9 @@ jobs:
186187 {
187188 "name": "Linux Lake",
188189 "os": large ? "nscloud-ubuntu-22.04-amd64-8x16-with-cache" : "ubuntu-latest",
189- "check-level ": 0 ,
190+ "enabled ": true ,
190191 "check-rebootstrap": level >= 1,
191192 "check-stage3": level >= 2,
192- // only check-level >= 1 opts into tests implicitly. TODO: Clean up this logic.
193193 "test": true,
194194 // NOTE: `test-speedcenter` currently seems to be broken on `ubuntu-latest`
195195 "test-speedcenter": large && level >= 2,
@@ -199,14 +199,16 @@ jobs:
199199 {
200200 "name": "Linux Reldebug",
201201 "os": "ubuntu-latest",
202- "check-level": 2,
202+ "enabled": level >= 2,
203+ "test": true,
203204 "CMAKE_PRESET": "reldebug",
204205 },
205206 // TODO: suddenly started failing in CI
206207 /*{
207208 "name": "Linux fsanitize",
208209 "os": "ubuntu-latest",
209- "check-level": 2,
210+ "enabled": level >= 2,
211+ "test": true,
210212 // turn off custom allocator & symbolic functions to make LSAN do its magic
211213 "CMAKE_PRESET": "sanitize",
212214 // exclude seriously slow/problematic tests (laketests crash)
@@ -217,7 +219,7 @@ jobs:
217219 "os": "macos-15-intel",
218220 "release": true,
219221 "test": false, // Tier 2 platform
220- "check-level": 2,
222+ "enabled": level >= 2,
221223 "shell": "bash -euxo pipefail {0}",
222224 "llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-apple-darwin.tar.zst",
223225 "prepare-llvm": "../script/prepare-llvm-macos.sh lean-llvm*",
@@ -228,23 +230,25 @@ jobs:
228230 {
229231 "name": "macOS aarch64",
230232 // standard GH runner only comes with 7GB so use large runner if possible when running tests
231- "os": large && !isPr ? "nscloud-macos-sequoia-arm64-6x14" : "macos-15",
233+ "os": large && level >= 1 ? "nscloud-macos-sequoia-arm64-6x14" : "macos-15",
232234 "CMAKE_OPTIONS": "-DLEAN_INSTALL_SUFFIX=-darwin_aarch64",
233235 "release": true,
236+ "test": true,
234237 "shell": "bash -euxo pipefail {0}",
235238 "llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-aarch64-apple-darwin.tar.zst",
236239 "prepare-llvm": "../script/prepare-llvm-macos.sh lean-llvm*",
237240 "binary-check": "otool -L",
238241 "tar": "gtar", // https://github.com/actions/runner-images/issues/2619
239242 // See "Linux release" for release job levels; Grove is not a concern here
240- "check-level ": isPr ? 0 : 2 ,
241- "secondary": isPr ,
243+ "enabled ": isPr || level != 1 ,
244+ "secondary": level == 0 ,
242245 },
243246 {
244247 "name": "Windows",
245248 "os": large && level == 2 ? "namespace-profile-windows-amd64-4x16" : "windows-2022",
246249 "release": true,
247- "check-level": 2,
250+ "enabled": level >= 2,
251+ "test": true,
248252 "shell": "msys2 {0}",
249253 "CMAKE_OPTIONS": "-G \"Unix Makefiles\"",
250254 "llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-w64-windows-gnu.tar.zst",
@@ -256,7 +260,8 @@ jobs:
256260 "os": "nscloud-ubuntu-22.04-arm64-4x16",
257261 "CMAKE_OPTIONS": "-DLEAN_INSTALL_SUFFIX=-linux_aarch64",
258262 "release": true,
259- "check-level": 2,
263+ "enabled": level >= 2,
264+ "test": true,
260265 "shell": "nix develop .#oldGlibcAArch -c bash -euxo pipefail {0}",
261266 "llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-aarch64-linux-gnu.tar.zst",
262267 "prepare-llvm": "../script/prepare-llvm-linux.sh lean-llvm*",
@@ -269,7 +274,7 @@ jobs:
269274 // "CMAKE_OPTIONS": "-DSTAGE0_USE_GMP=OFF -DSTAGE0_LEAN_EXTRA_CXX_FLAGS='-m32' -DSTAGE0_LEANC_OPTS='-m32' -DSTAGE0_MMAP=OFF -DUSE_GMP=OFF -DLEAN_EXTRA_CXX_FLAGS='-m32' -DLEANC_OPTS='-m32' -DMMAP=OFF -DLEAN_INSTALL_SUFFIX=-linux_x86 -DCMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ -DSTAGE0_CMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ -DPKG_CONFIG_EXECUTABLE=/usr/bin/i386-linux-gnu-pkg-config",
270275 // "cmultilib": true,
271276 // "release": true,
272- // "check-level": 2,
277+ // "enabled": level >= 2,
273278 // "cross": true,
274279 // "shell": "bash -euxo pipefail {0}"
275280 //}
@@ -281,7 +286,7 @@ jobs:
281286 // "wasm": true,
282287 // "cmultilib": true,
283288 // "release": true,
284- // "check-level": 2,
289+ // "enabled": level >= 2,
285290 // "cross": true,
286291 // "shell": "bash -euxo pipefail {0}",
287292 // // Just a few selected tests because wasm is slow
@@ -295,7 +300,7 @@ jobs:
295300 }
296301 }
297302 console.log(`matrix:\n${JSON.stringify(matrix, null, 2)}`);
298- matrix = matrix.filter((job) => level >= job["check-level "]);
303+ matrix = matrix.filter((job) => job["enabled "]);
299304 core.setOutput('matrix', matrix.filter((job) => !job["secondary"]));
300305 core.setOutput('matrix-secondary', matrix.filter((job) => job["secondary"]));
301306
@@ -305,7 +310,6 @@ jobs:
305310 uses : ./.github/workflows/build-template.yml
306311 with :
307312 config : ${{needs.configure.outputs.matrix}}
308- check-level : ${{ needs.configure.outputs.check-level }}
309313 nightly : ${{ needs.configure.outputs.nightly }}
310314 LEAN_VERSION_MAJOR : ${{ needs.configure.outputs.LEAN_VERSION_MAJOR }}
311315 LEAN_VERSION_MINOR : ${{ needs.configure.outputs.LEAN_VERSION_MINOR }}
@@ -321,7 +325,6 @@ jobs:
321325 uses : ./.github/workflows/build-template.yml
322326 with :
323327 config : ${{needs.configure.outputs.matrix-secondary}}
324- check-level : ${{ needs.configure.outputs.check-level }}
325328 nightly : ${{ needs.configure.outputs.nightly }}
326329 LEAN_VERSION_MAJOR : ${{ needs.configure.outputs.LEAN_VERSION_MAJOR }}
327330 LEAN_VERSION_MINOR : ${{ needs.configure.outputs.LEAN_VERSION_MINOR }}
0 commit comments