Skip to content

Commit

Permalink
feat: lake exe mk_all in CI (#11874)
Browse files Browse the repository at this point in the history
This PR replaces the shell commands for importing all the mathlib libraries by a lean executable defined in #11853.



Co-authored-by: Yaël Dillies <[email protected]>
  • Loading branch information
adomani and YaelDillies committed May 31, 2024
1 parent daa801e commit c9c411c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 80 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,6 @@ jobs:
run: |
./scripts/lint-bib.sh
check_imported:
if: github.repository == 'leanprover-community/mathlib4'
name: Check all files imported
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
find . -name . -o -prune -exec rm -rf -- {} +
- uses: actions/checkout@v4

- name: update import-only files in {Mathlib Mathlib/Tactic Counterexamples Archive}.lean
run: |
./scripts/mk_all.sh
- name: check that all files are imported
run: git diff --exit-code

check_workflows:
if: github.repository == 'leanprover-community/mathlib4'
name: check workflows
Expand Down Expand Up @@ -152,7 +134,7 @@ jobs:
# but verify that this didn't change anything in the `check_imported` job.
- name: update Mathlib.lean
run: |
./scripts/mk_all.sh Mathlib
lake exe mk_all --lib Mathlib
- name: If using a lean-pr-release toolchain, uninstall
run: |
Expand All @@ -166,6 +148,12 @@ jobs:
lean --version
lake --version
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
run: lake exe mk_all

- name: check_imported
run: git diff --exit-code

- name: build cache
run: |
lake build cache
Expand Down Expand Up @@ -319,7 +307,7 @@ jobs:
final:
name: Post-CI job
if: github.repository == 'leanprover-community/mathlib4'
needs: [style_lint, build, check_imported]
needs: [style_lint, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,6 @@ jobs:
run: |
./scripts/lint-bib.sh
check_imported:
if: github.repository == 'leanprover-community/mathlib4'
name: Check all files imported
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
find . -name . -o -prune -exec rm -rf -- {} +
- uses: actions/checkout@v4

- name: update import-only files in {Mathlib Mathlib/Tactic Counterexamples Archive}.lean
run: |
./scripts/mk_all.sh
- name: check that all files are imported
run: git diff --exit-code

check_workflows:
if: github.repository == 'leanprover-community/mathlib4'
name: check workflows
Expand Down Expand Up @@ -159,7 +141,7 @@ jobs:
# but verify that this didn't change anything in the `check_imported` job.
- name: update Mathlib.lean
run: |
./scripts/mk_all.sh Mathlib
lake exe mk_all --lib Mathlib
- name: If using a lean-pr-release toolchain, uninstall
run: |
Expand All @@ -173,6 +155,12 @@ jobs:
lean --version
lake --version
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
run: lake exe mk_all

- name: check_imported
run: git diff --exit-code

- name: build cache
run: |
lake build cache
Expand Down Expand Up @@ -326,7 +314,7 @@ jobs:
final:
name: Post-CI job
if: github.repository == 'leanprover-community/mathlib4'
needs: [style_lint, build, check_imported]
needs: [style_lint, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/build.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ jobs:
run: |
./scripts/lint-bib.sh

check_imported:
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib4'
name: Check all files importedJOB_NAME
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
find . -name . -o -prune -exec rm -rf -- {} +

- uses: actions/checkout@v4

- name: update import-only files in {Mathlib Mathlib/Tactic Counterexamples Archive}.lean
run: |
./scripts/mk_all.sh

- name: check that all files are imported
run: git diff --exit-code

check_workflows:
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib4'
name: check workflowsJOB_NAME
Expand Down Expand Up @@ -138,7 +120,7 @@ jobs:
# but verify that this didn't change anything in the `check_imported` job.
- name: update Mathlib.lean
run: |
./scripts/mk_all.sh Mathlib
lake exe mk_all --lib Mathlib

- name: If using a lean-pr-release toolchain, uninstall
run: |
Expand All @@ -152,6 +134,12 @@ jobs:
lean --version
lake --version

- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
run: lake exe mk_all

- name: check_imported
run: git diff --exit-code

- name: build cache
run: |
lake build cache
Expand Down Expand Up @@ -305,7 +293,7 @@ jobs:
final:
name: Post-CI jobJOB_NAME
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib4'
needs: [style_lint, build, check_imported]
needs: [style_lint, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/build_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,6 @@ jobs:
run: |
./scripts/lint-bib.sh
check_imported:
if: github.repository != 'leanprover-community/mathlib4'
name: Check all files imported (fork)
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
find . -name . -o -prune -exec rm -rf -- {} +
- uses: actions/checkout@v4

- name: update import-only files in {Mathlib Mathlib/Tactic Counterexamples Archive}.lean
run: |
./scripts/mk_all.sh
- name: check that all files are imported
run: git diff --exit-code

check_workflows:
if: github.repository != 'leanprover-community/mathlib4'
name: check workflows (fork)
Expand Down Expand Up @@ -156,7 +138,7 @@ jobs:
# but verify that this didn't change anything in the `check_imported` job.
- name: update Mathlib.lean
run: |
./scripts/mk_all.sh Mathlib
lake exe mk_all --lib Mathlib
- name: If using a lean-pr-release toolchain, uninstall
run: |
Expand All @@ -170,6 +152,12 @@ jobs:
lean --version
lake --version
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
run: lake exe mk_all

- name: check_imported
run: git diff --exit-code

- name: build cache
run: |
lake build cache
Expand Down Expand Up @@ -323,7 +311,7 @@ jobs:
final:
name: Post-CI job (fork)
if: github.repository != 'leanprover-community/mathlib4'
needs: [style_lint, build, check_imported]
needs: [style_lint, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit c9c411c

Please sign in to comment.