@@ -247,76 +247,6 @@ jobs:
247247 echo "✅ All inputRevs in lake-manifest.json are valid"
248248 fi
249249
250- - name : validate ProofWidgets source repository
251- # Only enforce this on the main mathlib4 repository, not on nightly-testing
252- if : github.repository == 'leanprover-community/mathlib4'
253- shell : bash
254- run : |
255- cd pr-branch
256-
257- expected_url='https://github.com/leanprover-community/ProofWidgets4'
258- proofwidgets_count=$(jq '[.packages[] | select(.name == "proofwidgets")] | length' lake-manifest.json)
259- if [ "$proofwidgets_count" -ne 1 ]; then
260- echo "❌ Error: expected exactly one proofwidgets entry in lake-manifest.json, found $proofwidgets_count"
261- exit 1
262- fi
263-
264- proofwidgets_url=$(jq -r '.packages[] | select(.name == "proofwidgets") | .url' lake-manifest.json)
265- normalized_url="${proofwidgets_url%.git}"
266- if [ "$normalized_url" != "$expected_url" ]; then
267- echo "❌ Error: invalid ProofWidgets source URL in lake-manifest.json"
268- echo " expected: $expected_url"
269- echo " found: $proofwidgets_url"
270- exit 1
271- fi
272-
273- echo "✅ ProofWidgets source URL is allowed: $proofwidgets_url"
274-
275- - name : verify ProofWidgets lean-toolchain matches on versioned releases
276- # Only enforce this on the main mathlib4 repository, not on nightly-testing
277- if : github.repository == 'leanprover-community/mathlib4'
278- shell : bash
279- run : |
280- cd pr-branch
281-
282- # Read the lean-toolchain file
283- TOOLCHAIN=$(cat lean-toolchain | tr -d '[:space:]')
284- echo "Lean toolchain: $TOOLCHAIN"
285-
286- # Check if toolchain matches the versioned release pattern: leanprover/lean4:vX.Y.Z (with optional suffix like -rc1)
287- if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then
288- echo "✓ Detected versioned Lean release: $TOOLCHAIN"
289- echo "Verifying ProofWidgets lean-toolchain matches..."
290-
291- # Check if ProofWidgets lean-toolchain exists
292- if [ ! -f .lake/packages/proofwidgets/lean-toolchain ]; then
293- echo "❌ Error: .lake/packages/proofwidgets/lean-toolchain does not exist"
294- echo "This file should be created by 'lake env' during dependency download."
295- exit 1
296- fi
297-
298- # Read ProofWidgets lean-toolchain
299- PROOFWIDGETS_TOOLCHAIN=$(cat .lake/packages/proofwidgets/lean-toolchain | tr -d '[:space:]')
300- echo "ProofWidgets toolchain: $PROOFWIDGETS_TOOLCHAIN"
301-
302- # Compare the two
303- if [ "$TOOLCHAIN" != "$PROOFWIDGETS_TOOLCHAIN" ]; then
304- echo "❌ Error: Lean toolchain mismatch!"
305- echo " Main lean-toolchain: $TOOLCHAIN"
306- echo " ProofWidgets lean-toolchain: $PROOFWIDGETS_TOOLCHAIN"
307- echo ""
308- echo "When using a versioned Lean release (leanprover/lean4:vX.Y.Z),"
309- echo "the ProofWidgets dependency must use the same toolchain."
310- echo "Please update the ProofWidgets dependency to use $TOOLCHAIN"
311- exit 1
312- else
313- echo "✅ ProofWidgets lean-toolchain matches: $TOOLCHAIN"
314- fi
315- else
316- echo "ℹ Lean toolchain is not a versioned release (pattern: leanprover/lean4:vX.Y.Z)"
317- echo "Skipping ProofWidgets toolchain verification."
318- fi
319-
320250 - name : get cache (1/3 - setup and initial fetch)
321251 id : get_cache_part1_setup
322252 shell : bash # only runs `cache get` from `tools-branch`, so doesn't need to be inside landrun
@@ -327,7 +257,7 @@ jobs:
327257
328258 # Fail quickly if the cache is completely cold, by checking for Mathlib.Init
329259 echo "Attempting to fetch olean for Mathlib/Init.lean from cache..."
330- ../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Mathlib/Init.lean
260+ ../tools-branch/.lake/build/bin/cache get Mathlib/Init.lean
331261
332262 - name : get cache (2/3 - test Mathlib.Init cache)
333263 id : get_cache_part2_test
@@ -381,9 +311,9 @@ jobs:
381311 echo "Warming up cache using previous commit: $PREV_SHA (source: $PREV_SHA_SOURCE)"
382312 if git cat-file -e "$PREV_SHA^{commit}" 2>/dev/null || git fetch --no-tags --depth=1 origin "$PREV_SHA"; then
383313 git checkout "$PREV_SHA"
384- ../tools-branch/.lake/build/bin/cache --skip-proofwidgets get
314+ ../tools-branch/.lake/build/bin/cache get
385315 # Run again with --repo, to ensure we actually get the oleans.
386- ../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" --skip-proofwidgets get
316+ ../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" get
387317
388318 echo "Switching back to branch head"
389319 git checkout "$ORIG_SHA"
@@ -396,18 +326,10 @@ jobs:
396326
397327 echo "Fetching all remaining cache..."
398328
399- ../tools-branch/.lake/build/bin/cache --skip-proofwidgets get
329+ ../tools-branch/.lake/build/bin/cache get
400330
401331 # Run again with --repo, to ensure we actually get the oleans.
402- ../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" --skip-proofwidgets get
403-
404- - name : fetch ProofWidgets release
405- # We need network access for ProofWidgets frontend assets.
406- # Run inside landrun so PR-controlled code remains sandboxed.
407- shell : landrun --unrestricted-network --rox /etc --rox /usr --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT --env CI -- bash -euxo pipefail {0}
408- run : |
409- cd pr-branch
410- lake build proofwidgets:release
332+ ../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" get
411333
412334 - name : update {Mathlib, Tactic, Counterexamples, Archive}.lean
413335 id : mk_all
@@ -462,8 +384,8 @@ jobs:
462384 shell : bash
463385 run : |
464386 cd pr-branch
465- ../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Archive.lean
466- ../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Counterexamples.lean
387+ ../tools-branch/.lake/build/bin/cache get Archive.lean
388+ ../tools-branch/.lake/build/bin/cache get Counterexamples.lean
467389
468390 - name : build archive
469391 id : archive
@@ -955,6 +877,7 @@ jobs:
955877 steps.get-label-actor.outputs.username == 'mathlib-update-dependencies' ||
956878 steps.get-label-actor.outputs.username == 'mathlib-splicebot' ||
957879 contains(steps.actorTeams.outputs.teams, 'mathlib-maintainers') ||
880+ contains(steps.actorTeams.outputs.teams, 'lean-release-managers') ||
958881 contains(steps.actorTeams.outputs.teams, 'bot-users')
959882 )
960883 name: If `auto-merge-after-CI` is present, add a `bors merge` comment.
0 commit comments