1515concurrency :
1616 # label each workflow run; only the latest with each label will run
1717 # workflows on master get more expressive labels
18- group : ${{ github.workflow }}-${{ github.ref }}-${{ (contains(fromJSON('["refs/heads/master", "refs/heads/staging"]'), github.ref) && github.run_id) || '' }}
18+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github. ref }}-${{ (github.event_name == 'push' && contains(fromJSON('["refs/heads/master", "refs/heads/staging"]'), github.ref) && github.run_id) || '' }}
1919 # cancel any running workflow with the same label
2020 cancel-in-progress : true
2121
4444 run :
4545 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}
4646 steps :
47+ - name : job info
48+ env :
49+ WORKFLOW : ${{ github.workflow }}
50+ PR_NUMBER : ${{ github.event.pull_request.number }}
51+ REF : ${{ github.ref }}
52+ EVENT_NAME : ${{ github.event_name }}
53+ RUN_ID : ${{ github.run_id }}
54+ CONCURRENCY_GROUP : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ (github.event_name == 'push' && contains(fromJSON('["refs/heads/master", "refs/heads/staging"]'), github.ref) && github.run_id) || '' }}
55+ run : |
56+ # We can view these values in the logs under the step environment variables
57+ # landrun doesn't see env variables anyways
4758 - name : cleanup
4859 shell : bash # This *just* deletes old files, so is safe to run outside landrun.
4960 run : |
@@ -63,11 +74,11 @@ jobs:
6374
6475 # The Hoskinson runners may not have jq installed, so do that now.
6576 - name : ' Setup jq'
66- uses : dcarbone/install-jq-action@f0e10f46ff84f4d32178b4b76e1ef180b16f82c3 # v3.1.1
77+ uses : dcarbone/install-jq-action@b7ef57d46ece78760b4019dbc4080a1ba2a40b45 # v3.2.0
6778
6879 # Checkout the master branch into a subdirectory
6980 - name : Checkout master branch
70- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
81+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7182 with :
7283 # Recall that on the `leanprover-community/mathlib4-nightly-testing` repository,
7384 # we don't maintain a `master` branch at all.
7788
7889 # Checkout the PR branch into a subdirectory
7990 - name : Checkout PR branch
80- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8192 with :
8293 ref : " ${{ PR_BRANCH_REF }}"
8394 path : pr-branch
@@ -295,6 +306,7 @@ jobs:
295306 echo "::endgroup::"
296307
297308 ../master-branch/scripts/lake-build-with-retry.sh Mathlib
309+ # results of build at pr-branch/.lake/build_summary_Mathlib.json
298310 - name : end gh-problem-match-wrap for build step
299311 uses : leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23
300312 with :
@@ -308,7 +320,7 @@ jobs:
308320
309321 - name : upload artifact containing contents of pr-branch
310322 # temporary measure for debugging no-build failures
311- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
323+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
312324 with :
313325 name : mathlib4_artifact
314326 include-hidden-files : true
@@ -363,13 +375,15 @@ jobs:
363375 run : |
364376 cd pr-branch
365377 ../master-branch/scripts/lake-build-with-retry.sh Archive
378+ # results of build at pr-branch/.lake/build_summary_Archive.json
366379
367380 - name : build counterexamples
368381 id : counterexamples
369382 continue-on-error : true
370383 run : |
371384 cd pr-branch
372385 ../master-branch/scripts/lake-build-with-retry.sh Counterexamples
386+ # results of build at pr-branch/.lake/build_summary_Counterexamples.json
373387
374388 - name : Check if building Archive or Counterexamples failed
375389 if : steps.archive.outcome == 'failure' || steps.counterexamples.outcome == 'failure'
@@ -416,7 +430,7 @@ jobs:
416430 id : test
417431 run : |
418432 cd pr-branch
419- lake --iofail test
433+ ../master-branch/scripts/lake-build-wrapper.py .lake/build_summary_MathlibTest.json lake --iofail test
420434 - name : end gh-problem-match-wrap for test step
421435 uses : leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23
422436 with :
@@ -440,7 +454,7 @@ jobs:
440454 id : lint
441455 run : |
442456 cd pr-branch
443- env LEAN_ABORT_ON_PANIC=1 lake exe runLinter Mathlib
457+ env LEAN_ABORT_ON_PANIC=1 ../master-branch/scripts/lake-build-wrapper.py .lake/build_summary_lint.json lake exe runLinter Mathlib
444458
445459 - name : end gh-problem-match-wrap for shake and lint steps
446460 uses : leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23
@@ -491,12 +505,12 @@ jobs:
491505 runs-on : ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
492506 steps :
493507
494- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
508+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
495509 with :
496510 ref : " ${{ PR_BRANCH_REF }}"
497511
498512 - name : Configure Lean
499- uses : leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
513+ uses : leanprover/lean-action@434f25c2f80ded67bba02502ad3a86f25db50709 # v1.3.0
500514 with :
501515 auto-config : false # Don't run `lake build`, `lake test`, or `lake lint` automatically.
502516 use-github-cache : false
@@ -539,7 +553,7 @@ jobs:
539553 lake exe graph
540554
541555 - name : upload the import graph
542- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
556+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
543557 with :
544558 name : import-graph
545559 path : import_graph.dot
0 commit comments