Skip to content

Commit 721b532

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/list-getd-eq-get
2 parents 92da2f9 + 540c589 commit 721b532

1,715 files changed

Lines changed: 30526 additions & 15055 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/build.in.yml

Lines changed: 6 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
shell: bash
134134
run: |
135135
# Construct the LEAN_SRC_PATH using the toolchain directory
136-
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"
136+
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"
137137
echo "LEAN_SRC_PATH=$LEAN_SRC_PATH"
138138
139139
# Set it as an environment variable for subsequent steps
@@ -328,37 +328,6 @@ jobs:
328328
env:
329329
MATHLIB_CACHE_SAS_RAW: ${{ secrets.MATHLIB_CACHE_SAS }}
330330

331-
# The cache secrets are available here, so we must not run any untrusted code.
332-
- name: Upload cache to Cloudflare
333-
id: cloudflare-upload-mathlib
334-
if: ${{ always() && steps.get.outcome == 'success' }}
335-
continue-on-error: true
336-
shell: bash
337-
run: |
338-
cd pr-branch
339-
340-
# Trim trailing whitespace from secrets to prevent issues with accidentally added spaces
341-
export MATHLIB_CACHE_S3_TOKEN="${MATHLIB_CACHE_S3_TOKEN_RAW%"${MATHLIB_CACHE_S3_TOKEN_RAW##*[![:space:]]}"}"
342-
343-
echo "Uploading cache to Cloudflare..."
344-
USE_FRO_CACHE=1 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked
345-
env:
346-
MATHLIB_CACHE_S3_TOKEN_RAW: ${{ secrets.MATHLIB_CACHE_S3_TOKEN }}
347-
348-
- name: Report Cloudflare upload failure on Zulip
349-
if: steps.cloudflare-upload-mathlib.outcome == 'failure'
350-
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
351-
with:
352-
api-key: ${{ secrets.ZULIP_API_KEY }}
353-
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
354-
organization-url: 'https://leanprover.zulipchat.com'
355-
to: 'nightly-testing'
356-
type: 'stream'
357-
topic: 'Cloudflare cache upload failure'
358-
content: |
359-
❌ 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 }}
360-
continue-on-error: true
361-
362331
# Note: we should not be including `Archive` and `Counterexamples` in the cache.
363332
# We do this for now for the sake of not rebuilding them in every CI run
364333
# even when they are not touched.
@@ -409,41 +378,11 @@ jobs:
409378
export MATHLIB_CACHE_SAS="${MATHLIB_CACHE_SAS_RAW%"${MATHLIB_CACHE_SAS_RAW##*[![:space:]]}"}"
410379
411380
echo "Uploading Archive and Counterexamples cache to Azure..."
412-
USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Archive.lean
413-
USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Counterexamples.lean
381+
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
382+
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
414383
env:
415384
MATHLIB_CACHE_SAS_RAW: ${{ secrets.MATHLIB_CACHE_SAS }}
416385

417-
- name: Upload Archive and Counterexamples cache to Cloudflare
418-
id: cloudflare-upload-archive
419-
continue-on-error: true
420-
shell: bash
421-
run: |
422-
cd pr-branch
423-
424-
# Trim trailing whitespace from secrets to prevent issues with accidentally added spaces
425-
export MATHLIB_CACHE_S3_TOKEN="${MATHLIB_CACHE_S3_TOKEN_RAW%"${MATHLIB_CACHE_S3_TOKEN_RAW##*[![:space:]]}"}"
426-
427-
echo "Uploading Archive and Counterexamples cache to Cloudflare..."
428-
USE_FRO_CACHE=1 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Archive.lean
429-
USE_FRO_CACHE=1 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put Counterexamples.lean
430-
env:
431-
MATHLIB_CACHE_S3_TOKEN_RAW: ${{ secrets.MATHLIB_CACHE_S3_TOKEN }}
432-
433-
- name: Report Cloudflare Archive/Counterexamples upload failure on Zulip
434-
if: steps.cloudflare-upload-archive.outcome == 'failure'
435-
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
436-
with:
437-
api-key: ${{ secrets.ZULIP_API_KEY }}
438-
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
439-
organization-url: 'https://leanprover.zulipchat.com'
440-
to: 'nightly-testing'
441-
type: 'stream'
442-
topic: 'Cloudflare cache upload failure'
443-
content: |
444-
❌ 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 }}
445-
continue-on-error: true
446-
447386
- name: Check {Mathlib, Tactic, Counterexamples, Archive}.lean
448387
if: always()
449388
run: |
@@ -550,29 +489,6 @@ jobs:
550489
use-mathlib-cache: false # This can be re-enabled once we are confident in the cache again.
551490
reinstall-transient-toolchain: true
552491

553-
- name: retrieve and test the Cloudflare caches, but don't fail, just report to Zulip, if anything goes wrong
554-
id: cloudflare-cache
555-
continue-on-error: true
556-
run: |
557-
lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get
558-
lake build --no-build -v Mathlib
559-
lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get Archive Counterexamples
560-
lake build --no-build -v Archive Counterexamples
561-
562-
- name: Report Cloudflare cache failure on Zulip
563-
if: steps.cloudflare-cache.outcome == 'failure'
564-
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
565-
with:
566-
api-key: ${{ secrets.ZULIP_API_KEY }}
567-
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
568-
organization-url: 'https://leanprover.zulipchat.com'
569-
to: 'nightly-testing'
570-
type: 'stream'
571-
topic: 'Cloudflare cache failure'
572-
content: |
573-
❌ 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 }}
574-
continue-on-error: true
575-
576492
- name: get cache for Mathlib
577493
run: |
578494
# Run once without --repo, so we can diagnose what `lake exe cache get` wants to do by itself.
@@ -590,13 +506,13 @@ jobs:
590506
- name: verify that everything was available in the cache
591507
run: |
592508
echo "::group::{verify Mathlib cache}"
593-
lake build --no-build -v Mathlib
509+
lake build --no-build --rehash -v Mathlib
594510
echo "::endgroup::"
595511
echo "::group::{verify Archive cache}"
596-
lake build --no-build -v Archive
512+
lake build --no-build --rehash -v Archive
597513
echo "::endgroup::"
598514
echo "::group::{verify Counterexamples cache}"
599-
lake build --no-build -v Counterexamples
515+
lake build --no-build --rehash -v Counterexamples
600516
echo "::endgroup::"
601517
602518
- name: check declarations in db files

.github/workflows/bors.yml

Lines changed: 6 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)