4848 # are valid by-products of the Mathlib build. Build artifacts fetched from Lake's cache do
4949 # not necessarily satisfy this property.
5050 LAKE_NO_CACHE : true
51+ MATHLIB_CACHE_BASE_URL : ${{ vars.MATHLIB_CACHE_BASE_URL }}
5152
5253jobs :
5354 build :
5758 build-outcome : ${{ steps.build.outcome }}
5859 archive-outcome : ${{ steps.archive.outcome }}
5960 counterexamples-outcome : ${{ steps.counterexamples.outcome }}
61+ wanted-outcome : ${{ steps.wanted.outcome }}
6062 cache-staging-has-files : ${{ steps.cache_staging_check.outputs.has_files }}
6163 mk_all-outcome : ${{ steps.mk_all.outcome }}
6264 noisy-outcome : ${{ steps.noisy.outcome }}
8082 # We just populate the env vars for this step to make them viewable in the logs
8183
8284 - name : Checkout local actions
83- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
85+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
8486 with :
8587 ref : ${{ github.workflow_sha }}
8688 fetch-depth : 1
@@ -230,12 +232,13 @@ jobs:
230232 # storing and transferring oleans over the network.
231233 # Hopefully a future re-implementation of `cache` will obviate the present need for this hack.
232234
233- - name : fetch archive and counterexamples cache
235+ - name : fetch archive, counterexamples and wanted cache
234236 shell : bash
235237 run : |
236238 cd pr-branch
237239 ../tools-branch/.lake/build/bin/cache get Archive.lean
238240 ../tools-branch/.lake/build/bin/cache get Counterexamples.lean
241+ ../tools-branch/.lake/build/bin/cache get Wanted.lean
239242
240243 - name : build archive
241244 id : archive
@@ -253,8 +256,16 @@ jobs:
253256 ../tools-branch/scripts/lake-build-with-retry.sh Counterexamples
254257 # results of build at pr-branch/.lake/build_summary_Counterexamples.json
255258
259+ - name : build wanted
260+ id : wanted
261+ continue-on-error : true
262+ run : |
263+ cd pr-branch
264+ ../tools-branch/scripts/lake-build-with-retry.sh Wanted
265+ # results of build at pr-branch/.lake/build_summary_Wanted.json
266+
256267 # Runs in the build job because it only needs the freshly-built Mathlib/
257- # Archive/Counterexamples oleans, which are present here; keeping it in
268+ # Archive/Counterexamples/Wanted oleans, which are present here; keeping it in
258269 # `build` also spares `test_lint` from fetching Archive/Counterexamples.
259270 - name : check for noisy stdout lines
260271 id : noisy
@@ -263,7 +274,7 @@ jobs:
263274 buildMsgs="$(
264275 ## we exploit `lake`s replay feature: since the cache is present, running
265276 ## `lake build` will reproduce all the outputs without having to recompute
266- lake build -q --iofail Mathlib Archive Counterexamples
277+ lake build -q --iofail Mathlib Archive Counterexamples Wanted
267278 )"
268279 if [ -n "${buildMsgs}" ]
269280 then
@@ -300,6 +311,13 @@ jobs:
300311 cd pr-branch
301312 lake env ../tools-branch/.lake/build/bin/cache --staging-dir="../cache-staging" stage Counterexamples.lean
302313
314+ - name : stage Wanted cache files
315+ if : ${{ steps.wanted.outcome == 'success' }}
316+ shell : landrun --rox /usr --ro /etc/timezone --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --rw cache-staging/ --env PATH --env HOME --env GITHUB_OUTPUT --env CI -- bash -euxo pipefail {0}
317+ run : |
318+ cd pr-branch
319+ lake env ../tools-branch/.lake/build/bin/cache --staging-dir="../cache-staging" stage Wanted.lean
320+
303321 - name : check cache staging contents
304322 id : cache_staging_check
305323 if : ${{ always() && (steps.build.outcome == 'success' || steps.build.outcome == 'failure' || steps.build.outcome == 'cancelled') }}
@@ -395,7 +413,7 @@ jobs:
395413 shell : landrun --rox /usr --ro /etc/timezone --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT --env CI -- bash -euxo pipefail {0}
396414 steps :
397415 - name : Checkout local actions
398- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
416+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
399417 with :
400418 ref : ${{ github.workflow_sha }}
401419 fetch-depth : 1
@@ -463,19 +481,19 @@ jobs:
463481 # the archive/counterexamples builds all succeeded. The condition reads those
464482 # from the build job's outputs, and the problem-matcher wrap is gated to match.
465483 - name : begin gh-problem-match-wrap for test step
466- if : ${{ needs.build.outputs.build-outcome == 'success' && needs.build.outputs.mk_all-outcome == 'success' && needs.build.outputs.archive-outcome == 'success' && needs.build.outputs.counterexamples-outcome == 'success' }}
484+ if : ${{ needs.build.outputs.build-outcome == 'success' && needs.build.outputs.mk_all-outcome == 'success' && needs.build.outputs.archive-outcome == 'success' && needs.build.outputs.counterexamples-outcome == 'success' && needs.build.outputs.wanted-outcome == 'success' }}
467485 uses : leanprover-community/gh-problem-matcher-wrap@65a654fcdf7b64ff7633bc7a558f7b46d59a27bf # 2026-06-25
468486 with :
469487 action : add # In order to be able to run a multiline script, we need to add/remove the problem matcher before and after.
470488 linters : lean
471489 - name : test mathlib
472- if : ${{ needs.build.outputs.build-outcome == 'success' && needs.build.outputs.mk_all-outcome == 'success' && needs.build.outputs.archive-outcome == 'success' && needs.build.outputs.counterexamples-outcome == 'success' }}
490+ if : ${{ needs.build.outputs.build-outcome == 'success' && needs.build.outputs.mk_all-outcome == 'success' && needs.build.outputs.archive-outcome == 'success' && needs.build.outputs.counterexamples-outcome == 'success' && needs.build.outputs.wanted-outcome == 'success' }}
473491 id : test
474492 run : |
475493 cd pr-branch
476494 ../tools-branch/scripts/lake-build-wrapper.py .lake/build_summary_MathlibTest.json lake --iofail test
477495 - name : end gh-problem-match-wrap for test step
478- if : ${{ needs.build.outputs.build-outcome == 'success' && needs.build.outputs.mk_all-outcome == 'success' && needs.build.outputs.archive-outcome == 'success' && needs.build.outputs.counterexamples-outcome == 'success' }}
496+ if : ${{ needs.build.outputs.build-outcome == 'success' && needs.build.outputs.mk_all-outcome == 'success' && needs.build.outputs.archive-outcome == 'success' && needs.build.outputs.counterexamples-outcome == 'success' && needs.build.outputs.wanted-outcome == 'success' }}
479497 uses : leanprover-community/gh-problem-matcher-wrap@65a654fcdf7b64ff7633bc7a558f7b46d59a27bf # 2026-06-25
480498 with :
481499 action : remove
@@ -605,7 +623,7 @@ jobs:
605623 # `build_template` via `pull_request_target`, never this one — so
606624 # `pr_branch_ref` is always a trusted ref here. Fork PRs keep `master`.
607625 - name : Checkout tools branch
608- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
626+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
609627 with :
610628 ref : ${{ inputs.tools_branch_ref != '' && inputs.tools_branch_ref || (github.event.pull_request.head.repo.fork && 'master' || inputs.pr_branch_ref) }}
611629 fetch-depth : 1
@@ -675,7 +693,7 @@ jobs:
675693 contents : read
676694 steps :
677695
678- - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
696+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
679697 with :
680698 ref : ${{ inputs.pr_branch_ref }}
681699 # Untrusted (potentially fork) checkout: don't persist the GITHUB_TOKEN into its .git/config.
@@ -692,7 +710,7 @@ jobs:
692710 # miss. `github.workflow_sha` is the base ref the workflow runs from,
693711 # master for fork PRs, whose `cache` binary wrote the cache.
694712 - name : Checkout local actions and Cache baseline
695- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
713+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
696714 with :
697715 ref : ${{ github.workflow_sha }}
698716 fetch-depth : 1
@@ -802,7 +820,7 @@ jobs:
802820 lake exe graph
803821
804822 - name : Checkout local actions
805- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
823+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
806824 with :
807825 ref : ${{ github.workflow_sha }}
808826 fetch-depth : 1
@@ -1015,7 +1033,7 @@ jobs:
10151033 contains(steps.actorTeams.outputs.teams, 'bot-users')
10161034 )
10171035 name: If `auto-merge-after-CI` is present, add a `bors merge` comment.
1018- uses: GrantBirki/comment@3439715f0cf3b8fc29bf47be0e3226679c06c41a # v3.0.0
1036+ uses: GrantBirki/comment@937820f3623fd0e300294bcc64ac7577fc0ad4cc # v3.0.3
10191037 with:
10201038 # This token is masked by the token minting action and will not be logged accidentally.
10211039 token: ${{ steps.auto-merge-app-token.outputs.token }}
0 commit comments