1414 - ' staging.tmp*'
1515 - ' trying.tmp*'
1616 - ' staging*.tmp'
17- - ' nolints'
1817 # ignore staging branch used by bors, this is handled by bors.yml
1918 - ' staging'
2019 merge_group :
5554 lint-outcome : ${{ steps.lint.outcome }}
5655 mk_all-outcome : ${{ steps.mk_all.outcome }}
5756 noisy-outcome : ${{ steps.noisy.outcome }}
58- shake-outcome : ${{ steps.shake.outcome }}
57+ # shake-outcome: ${{ steps.shake.outcome }}
5958 test-outcome : ${{ steps.test.outcome }}
6059 defaults : # On Hoskinson runners, landrun is already installed.
6160 run : # note that .pr-branch/.lake must be created in a step below before we use this
@@ -240,7 +239,7 @@ jobs:
240239
241240 # Extract all inputRevs from the manifest
242241 invalid_revs=$(jq -r '.packages[].inputRev // empty' lake-manifest.json | \
243- grep -v -E '^(main|master|v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?)$' || true)
242+ grep -v -E '^(main|master|v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)? )$' || true)
244243
245244 if [ -n "$invalid_revs" ]; then
246245 echo "❌ Error: Found invalid inputRevs in lake-manifest.json:"
@@ -249,12 +248,57 @@ jobs:
249248 echo "All inputRevs must be one of:"
250249 echo " - 'main'"
251250 echo " - 'master'"
252- echo " - 'vX.Y.Z' (semantic version, e.g., v1.2.3 or v1.2.3-pre)"
251+ echo " - 'vX.Y.Z' (semantic version, e.g., v1.2.3, v1.2.3-pre, or v1.2.3+build )"
253252 exit 1
254253 else
255254 echo "✅ All inputRevs in lake-manifest.json are valid"
256255 fi
257256
257+ - name : verify ProofWidgets lean-toolchain matches on versioned releases
258+ # Only enforce this on the main mathlib4 repository, not on nightly-testing
259+ if : github.repository == 'leanprover-community/mathlib4'
260+ shell : bash
261+ run : |
262+ cd pr-branch
263+
264+ # Read the lean-toolchain file
265+ TOOLCHAIN=$(cat lean-toolchain | tr -d '[:space:]')
266+ echo "Lean toolchain: $TOOLCHAIN"
267+
268+ # Check if toolchain matches the versioned release pattern: leanprover/lean4:vX.Y.Z (with optional suffix like -rc1)
269+ if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then
270+ echo "✓ Detected versioned Lean release: $TOOLCHAIN"
271+ echo "Verifying ProofWidgets lean-toolchain matches..."
272+
273+ # Check if ProofWidgets lean-toolchain exists
274+ if [ ! -f .lake/packages/proofwidgets/lean-toolchain ]; then
275+ echo "❌ Error: .lake/packages/proofwidgets/lean-toolchain does not exist"
276+ echo "This file should be created by 'lake env' during dependency download."
277+ exit 1
278+ fi
279+
280+ # Read ProofWidgets lean-toolchain
281+ PROOFWIDGETS_TOOLCHAIN=$(cat .lake/packages/proofwidgets/lean-toolchain | tr -d '[:space:]')
282+ echo "ProofWidgets toolchain: $PROOFWIDGETS_TOOLCHAIN"
283+
284+ # Compare the two
285+ if [ "$TOOLCHAIN" != "$PROOFWIDGETS_TOOLCHAIN" ]; then
286+ echo "❌ Error: Lean toolchain mismatch!"
287+ echo " Main lean-toolchain: $TOOLCHAIN"
288+ echo " ProofWidgets lean-toolchain: $PROOFWIDGETS_TOOLCHAIN"
289+ echo ""
290+ echo "When using a versioned Lean release (leanprover/lean4:vX.Y.Z),"
291+ echo "the ProofWidgets dependency must use the same toolchain."
292+ echo "Please update the ProofWidgets dependency to use $TOOLCHAIN"
293+ exit 1
294+ else
295+ echo "✅ ProofWidgets lean-toolchain matches: $TOOLCHAIN"
296+ fi
297+ else
298+ echo "ℹ Lean toolchain is not a versioned release (pattern: leanprover/lean4:vX.Y.Z)"
299+ echo "Skipping ProofWidgets toolchain verification."
300+ fi
301+
258302 - name : get cache (1/3 - setup and initial fetch)
259303 id : get_cache_part1_setup
260304 shell : bash # only runs `cache get` from `master-branch`, so doesn't need to be inside landrun
@@ -429,7 +473,7 @@ jobs:
429473 MATHLIB_CACHE_SAS_RAW : ${{ secrets.MATHLIB_CACHE_SAS }}
430474
431475 - name : Check {Mathlib, Tactic, Counterexamples, Archive}.lean
432- if : always()
476+ if : ${{ always() && steps.mk_all.outcome != 'skipped' }}
433477 run : |
434478 if [[ "${{ steps.mk_all.outcome }}" != "success" ]]; then
435479 echo "Please run 'lake exe mk_all' to regenerate the import all files"
@@ -460,11 +504,13 @@ jobs:
460504 action : add # In order to be able to run a multiline script, we need to add/remove the problem matcher before and after.
461505 linters : gcc
462506
463- - name : check for unused imports
464- id : shake
465- run : |
466- cd pr-branch
467- env LEAN_ABORT_ON_PANIC=1 lake exe shake --gh-style
507+ # With the arrival of the module system, the old `shake` is no longer functional.
508+ # This will be replaced soon.
509+ # - name: check for unused imports
510+ # id: shake
511+ # run: |
512+ # cd pr-branch
513+ # env LEAN_ABORT_ON_PANIC=1 lake exe shake --gh-style
468514
469515 - name : lint mathlib
470516 if : ${{ always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure' }}
0 commit comments