Skip to content

Commit 44978c2

Browse files
committed
ci: Revert cache get default behavior for skip-proofwidgets (leanprover-community#35542)
For backwards compatibility, as downstream projects depend on this tool
1 parent f39a841 commit 44978c2

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

.github/workflows/build_template.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ jobs:
323323
324324
# Fail quickly if the cache is completely cold, by checking for Mathlib.Init
325325
echo "Attempting to fetch olean for Mathlib/Init.lean from cache..."
326-
../tools-branch/.lake/build/bin/cache get Mathlib/Init.lean
326+
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Mathlib/Init.lean
327327
328328
- name: get cache (2/3 - test Mathlib.Init cache)
329329
id: get_cache_part2_test
@@ -343,10 +343,10 @@ jobs:
343343
if [[ "${{ steps.get_cache_part2_test.outcome }}" == "success" ]]; then
344344
echo "Fetching all remaining cache..."
345345
346-
../tools-branch/.lake/build/bin/cache get
346+
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get
347347
348348
# Run again with --repo, to ensure we actually get the oleans.
349-
../tools-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get
349+
../tools-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} --skip-proofwidgets get
350350
else
351351
echo "WARNING: 'lake build --no-build -v Mathlib.Init' failed."
352352
echo "No cache for 'Mathlib.Init' available or it could not be prepared."
@@ -413,8 +413,8 @@ jobs:
413413
shell: bash
414414
run: |
415415
cd pr-branch
416-
../tools-branch/.lake/build/bin/cache get Archive.lean
417-
../tools-branch/.lake/build/bin/cache get Counterexamples.lean
416+
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Archive.lean
417+
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Counterexamples.lean
418418
419419
- name: build archive
420420
id: archive
@@ -708,16 +708,16 @@ jobs:
708708
- name: get cache for Mathlib
709709
run: |
710710
# Run once without --repo, so we can diagnose what `lake exe cache get` wants to do by itself.
711-
lake exe cache --include-proofwidgets get
711+
lake exe cache get
712712
# Run again with --repo, so ensure we actually get the oleans.
713-
lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} --include-proofwidgets get
713+
lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get
714714
715715
- name: get cache for Archive and Counterexamples
716716
run: |
717717
# Run once without --repo, so we can diagnose what `lake exe cache get` wants to do by itself.
718-
lake exe cache --include-proofwidgets get Archive Counterexamples
718+
lake exe cache get Archive Counterexamples
719719
# Run again with --repo, so ensure we actually get the oleans.
720-
lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} --include-proofwidgets get Archive Counterexamples
720+
lake exe cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} get Archive Counterexamples
721721
722722
- name: verify that everything was available in the cache
723723
run: |

Cache/Main.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Commands:
3939
Options:
4040
--repo=OWNER/REPO Override the repository to fetch/push cache from
4141
--staging-dir=<output-directory> Required for 'stage', 'stage!', 'unstage' and 'put-staged': staging directory.
42-
--include-proofwidgets Include fetching/building ProofWidgets release assets during 'get'
42+
--skip-proofwidgets Skip fetching/building ProofWidgets release assets during 'get'
4343
4444
* Linked files refer to local cache files with corresponding Lean sources
4545
* Commands ending with '!' should be used manually, when hot-fixes are needed
@@ -101,9 +101,7 @@ def main (args : List String) : IO Unit := do
101101
-- parse relevant options, ignore the rest
102102
let repo? ← parseNamedOpt "repo" options
103103
let stagingDir? ← parseNamedOpt "staging-dir" options
104-
let includeProofWidgets := parseFlagOpt "include-proofwidgets" options
105-
let inGitHubActions := (← IO.getEnv "GITHUB_ACTIONS") == some "true"
106-
let skipProofWidgets := inGitHubActions && !includeProofWidgets
104+
let skipProofWidgets := parseFlagOpt "skip-proofwidgets" options
107105

108106
let mut roots : Std.HashMap Lean.Name FilePath ← parseArgs args
109107
if roots.isEmpty then do

0 commit comments

Comments
 (0)