@@ -143,7 +143,7 @@ jobs:
143143 shell : bash
144144 run : |
145145 # Construct the LEAN_SRC_PATH using the toolchain directory
146- LEAN_SRC_PATH=".:$TOOLCHAIN_DIR/src/lean/lake:.lake/packages/Cli:.lake/packages/batteries:.lake/packages/Qq:.lake/packages/aesop:.lake/packages/proofwidgets:.lake/packages/importGraph:.lake/packages/LeanSearchClient:.lake/packages/plausible"
146+ LEAN_SRC_PATH=".:$TOOLCHAIN_DIR/src/lean/lake:.lake/packages/Cli:.lake/packages/batteries:.lake/packages/Qq:.lake/packages/aesop:.lake/packages/proofwidgets:.lake/packages/importGraph:.lake/packages/LeanSearchClient:.lake/packages/plausible:.lake/packages/requests:.lake/packages/openAI_client:.lake/packages/reap "
147147 echo "LEAN_SRC_PATH=$LEAN_SRC_PATH"
148148
149149 # Set it as an environment variable for subsequent steps
@@ -338,37 +338,6 @@ jobs:
338338 env :
339339 MATHLIB_CACHE_SAS_RAW : ${{ secrets.MATHLIB_CACHE_SAS }}
340340
341- # The cache secrets are available here, so we must not run any untrusted code.
342- - name : Upload cache to Cloudflare
343- id : cloudflare-upload-mathlib
344- if : ${{ always() && steps.get.outcome == 'success' }}
345- continue-on-error : true
346- shell : bash
347- run : |
348- cd pr-branch
349-
350- # Trim trailing whitespace from secrets to prevent issues with accidentally added spaces
351- export MATHLIB_CACHE_S3_TOKEN="${MATHLIB_CACHE_S3_TOKEN_RAW%"${MATHLIB_CACHE_S3_TOKEN_RAW##*[![:space:]]}"}"
352-
353- echo "Uploading cache to Cloudflare..."
354- USE_FRO_CACHE=1 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked
355- env :
356- MATHLIB_CACHE_S3_TOKEN_RAW : ${{ secrets.MATHLIB_CACHE_S3_TOKEN }}
357-
358- - name : Report Cloudflare upload failure on Zulip
359- if : steps.cloudflare-upload-mathlib.outcome == 'failure'
360- uses : zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
361- with :
362- api-key : ${{ secrets.ZULIP_API_KEY }}
363- email : ' github-mathlib4-bot@leanprover.zulipchat.com'
364- organization-url : ' https://leanprover.zulipchat.com'
365- to : ' nightly-testing'
366- type : ' stream'
367- topic : ' Cloudflare cache upload failure'
368- content : |
369- ❌ Cloudflare cache upload (Mathlib) [failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for PR #${{ github.event.pull_request.number || 'push' }} on commit ${{ github.sha }}
370- continue-on-error : true
371-
372341 # Note: we should not be including `Archive` and `Counterexamples` in the cache.
373342 # We do this for now for the sake of not rebuilding them in every CI run
374343 # even when they are not touched.
@@ -419,41 +388,11 @@ jobs:
419388 export MATHLIB_CACHE_SAS="${MATHLIB_CACHE_SAS_RAW%"${MATHLIB_CACHE_SAS_RAW##*[![:space:]]}"}"
420389
421390 echo "Uploading Archive and Counterexamples cache to Azure..."
422- USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Archive.lean
423- USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Counterexamples.lean
391+ USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked Archive.lean
392+ USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked Counterexamples.lean
424393 env :
425394 MATHLIB_CACHE_SAS_RAW : ${{ secrets.MATHLIB_CACHE_SAS }}
426395
427- - name : Upload Archive and Counterexamples cache to Cloudflare
428- id : cloudflare-upload-archive
429- continue-on-error : true
430- shell : bash
431- run : |
432- cd pr-branch
433-
434- # Trim trailing whitespace from secrets to prevent issues with accidentally added spaces
435- export MATHLIB_CACHE_S3_TOKEN="${MATHLIB_CACHE_S3_TOKEN_RAW%"${MATHLIB_CACHE_S3_TOKEN_RAW##*[![:space:]]}"}"
436-
437- echo "Uploading Archive and Counterexamples cache to Cloudflare..."
438- USE_FRO_CACHE=1 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Archive.lean
439- USE_FRO_CACHE=1 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Counterexamples.lean
440- env :
441- MATHLIB_CACHE_S3_TOKEN_RAW : ${{ secrets.MATHLIB_CACHE_S3_TOKEN }}
442-
443- - name : Report Cloudflare Archive/Counterexamples upload failure on Zulip
444- if : steps.cloudflare-upload-archive.outcome == 'failure'
445- uses : zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
446- with :
447- api-key : ${{ secrets.ZULIP_API_KEY }}
448- email : ' github-mathlib4-bot@leanprover.zulipchat.com'
449- organization-url : ' https://leanprover.zulipchat.com'
450- to : ' nightly-testing'
451- type : ' stream'
452- topic : ' Cloudflare cache upload failure'
453- content : |
454- ❌ Cloudflare cache upload (Archive/Counterexamples) [failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for PR #${{ github.event.pull_request.number || 'push' }} on commit ${{ github.sha }}
455- continue-on-error : true
456-
457396 - name : Check {Mathlib, Tactic, Counterexamples, Archive}.lean
458397 if : always()
459398 run : |
@@ -560,29 +499,6 @@ jobs:
560499 use-mathlib-cache : false # This can be re-enabled once we are confident in the cache again.
561500 reinstall-transient-toolchain : true
562501
563- - name : retrieve and test the Cloudflare caches, but don't fail, just report to Zulip, if anything goes wrong
564- id : cloudflare-cache
565- continue-on-error : true
566- run : |
567- lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get
568- lake build --no-build -v Mathlib
569- lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get Archive Counterexamples
570- lake build --no-build -v Archive Counterexamples
571-
572- - name : Report Cloudflare cache failure on Zulip
573- if : steps.cloudflare-cache.outcome == 'failure'
574- uses : zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
575- with :
576- api-key : ${{ secrets.ZULIP_API_KEY }}
577- email : ' github-mathlib4-bot@leanprover.zulipchat.com'
578- organization-url : ' https://leanprover.zulipchat.com'
579- to : ' nightly-testing'
580- type : ' stream'
581- topic : ' Cloudflare cache failure'
582- content : |
583- ❌ Cloudflare cache retrieval/test [failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for PR #${{ github.event.pull_request.number || 'push' }} on commit ${{ github.sha }}
584- continue-on-error : true
585-
586502 - name : get cache for Mathlib
587503 run : |
588504 # Run once without --repo, so we can diagnose what `lake exe cache get` wants to do by itself.
@@ -600,13 +516,13 @@ jobs:
600516 - name : verify that everything was available in the cache
601517 run : |
602518 echo "::group::{verify Mathlib cache}"
603- lake build --no-build -v Mathlib
519+ lake build --no-build --rehash - v Mathlib
604520 echo "::endgroup::"
605521 echo "::group::{verify Archive cache}"
606- lake build --no-build -v Archive
522+ lake build --no-build --rehash - v Archive
607523 echo "::endgroup::"
608524 echo "::group::{verify Counterexamples cache}"
609- lake build --no-build -v Counterexamples
525+ lake build --no-build --rehash - v Counterexamples
610526 echo "::endgroup::"
611527
612528 - name : check declarations in db files
@@ -635,6 +551,12 @@ jobs:
635551 run : |
636552 lake build Batteries Qq Aesop ProofWidgets Plausible
637553
554+ - name : build AesopTest (nightly-testing only)
555+ # Only run on the mathlib4-nightly-testing repository
556+ if : github.repository == 'leanprover-community/mathlib4-nightly-testing'
557+ run : |
558+ lake build AesopTest
559+
638560 # We no longer run `lean4checker` in regular CI, as it is quite expensive for little benefit.
639561 # Instead we run it in a cron job on master: see `lean4checker.yml`.
640562 # Output is posted to the zulip topic
@@ -675,16 +597,6 @@ jobs:
675597 lint-bib-file : true
676598 ref : ${{ github.sha }}
677599
678- build_and_lint :
679- name : CI Success
680- if : github.repository == 'leanprover-community/mathlib4' || github.repository == 'leanprover-community/mathlib4-nightly-testing'
681- needs : [style_lint, post_steps]
682- runs-on : ubuntu-latest
683- steps :
684- - name : succeed
685- run : |
686- echo "Success: Required build and lint checks completed!"
687-
688600 final :
689601 name : Post-CI job
690602 if : github.repository == 'leanprover-community/mathlib4' || github.repository == 'leanprover-community/mathlib4-nightly-testing'
0 commit comments