Skip to content

Commit

Permalink
chore(ci): remove working directory on self-hosted (#11645)
Browse files Browse the repository at this point in the history
Mathlib now takes several gigabytes to build.  This addresses some of the space issues on the CI machines.
  • Loading branch information
gebner committed Jan 24, 2022
1 parent 511aa35 commit 32052b8
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/bors.yml
Expand Up @@ -114,6 +114,10 @@ jobs:
if: always() && steps.build.outputs.started == 'true' && ${{ 1 }}
run: rm /tmp/tmp-* || true

- name: clean up working directory and elan
if: always() && ${{ 1 }}
run: rm -rf * $HOME/.elan

lint:
name: Lint mathlib
runs-on: bors
Expand Down Expand Up @@ -145,7 +149,11 @@ jobs:
- name: lint
run: |
./scripts/mk_all.sh
lean --run scripts/lint_mathlib.lean
lean --run scripts/lint_mathlib.lean --github
- name: clean up working directory and elan
if: always() && ${{ 1 }}
run: rm -rf * $HOME/.elan

tests:
name: Run tests
Expand Down Expand Up @@ -215,6 +223,10 @@ jobs:
bash scripts/mk_all.sh
lean --run scripts/yaml_check.lean
- name: clean up working directory and elan
if: always() && ${{ 1 }}
run: rm -rf * $HOME/.elan

final:
name: Post-CI job
if: github.repository == 'leanprover-community/mathlib'
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -122,6 +122,10 @@ jobs:
if: always() && steps.build.outputs.started == 'true' && ${{ 1 }}
run: rm /tmp/tmp-* || true

- name: clean up working directory and elan
if: always() && ${{ 1 }}
run: rm -rf * $HOME/.elan

lint:
name: Lint mathlib
runs-on: pr
Expand Down Expand Up @@ -155,6 +159,10 @@ jobs:
./scripts/mk_all.sh
lean --run scripts/lint_mathlib.lean --github
- name: clean up working directory and elan
if: always() && ${{ 1 }}
run: rm -rf * $HOME/.elan

tests:
name: Run tests
runs-on: pr
Expand Down Expand Up @@ -223,6 +231,10 @@ jobs:
bash scripts/mk_all.sh
lean --run scripts/yaml_check.lean
- name: clean up working directory and elan
if: always() && ${{ 1 }}
run: rm -rf * $HOME/.elan

final:
name: Post-CI job
if: github.repository == 'leanprover-community/mathlib'
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/build.yml.in
Expand Up @@ -100,6 +100,10 @@ jobs:
if: always() && steps.build.outputs.started == 'true' && ${{ IS_SELF_HOSTED }}
run: rm /tmp/tmp-* || true

- name: clean up working directory and elan
if: always() && ${{ IS_SELF_HOSTED }}
run: rm -rf * $HOME/.elan

lint:
name: Lint mathlibJOB_NAME
runs-on: RUNS_ON
Expand Down Expand Up @@ -131,7 +135,11 @@ jobs:
- name: lint
run: |
./scripts/mk_all.sh
lean --run scripts/lint_mathlib.lean
lean --run scripts/lint_mathlib.lean --github

- name: clean up working directory and elan
if: always() && ${{ IS_SELF_HOSTED }}
run: rm -rf * $HOME/.elan

tests:
name: Run testsJOB_NAME
Expand Down Expand Up @@ -201,6 +209,10 @@ jobs:
bash scripts/mk_all.sh
lean --run scripts/yaml_check.lean

- name: clean up working directory and elan
if: always() && ${{ IS_SELF_HOSTED }}
run: rm -rf * $HOME/.elan

final:
name: Post-CI jobJOB_NAME
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib'
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/build_fork.yml
Expand Up @@ -120,6 +120,10 @@ jobs:
if: always() && steps.build.outputs.started == 'true' && ${{ 0 }}
run: rm /tmp/tmp-* || true

- name: clean up working directory and elan
if: always() && ${{ 0 }}
run: rm -rf * $HOME/.elan

lint:
name: Lint mathlib (fork)
runs-on: ubuntu-latest
Expand Down Expand Up @@ -151,7 +155,11 @@ jobs:
- name: lint
run: |
./scripts/mk_all.sh
lean --run scripts/lint_mathlib.lean
lean --run scripts/lint_mathlib.lean --github
- name: clean up working directory and elan
if: always() && ${{ 0 }}
run: rm -rf * $HOME/.elan

tests:
name: Run tests (fork)
Expand Down Expand Up @@ -221,6 +229,10 @@ jobs:
bash scripts/mk_all.sh
lean --run scripts/yaml_check.lean
- name: clean up working directory and elan
if: always() && ${{ 0 }}
run: rm -rf * $HOME/.elan

final:
name: Post-CI job (fork)
if: github.repository != 'leanprover-community/mathlib'
Expand Down

0 comments on commit 32052b8

Please sign in to comment.