Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localise pytools cache to each runner #3980

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
FIREDRAKE_CI_TESTS: 1 # needed to symlink the checked out branch into the venv
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
steps:
- name: Add homebrew to PATH
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
Expand All @@ -35,7 +36,7 @@ jobs:
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv
rm -rf firedrake_venv "$XDG_CACHE_HOME"
- name: Install Python
run: brew install python python-setuptools
- name: Build Firedrake
Expand All @@ -58,4 +59,4 @@ jobs:
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv
rm -rf firedrake_venv "$XDG_CACHE_HOME"
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ jobs:
OPENBLAS_NUM_THREADS: 1
COMPLEX: ${{ matrix.complex }}
RDMAV_FORK_SAFE: 1
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
steps:
- uses: actions/checkout@v4
- name: Cleanup
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv
rm -rf firedrake_venv "$XDG_CACHE_HOME"
- name: Build Firedrake
run: |
cd ..
Expand Down Expand Up @@ -134,7 +135,7 @@ jobs:
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv
rm -rf firedrake_venv "$XDG_CACHE_HOME"
docker_tag:
name: "Set the Docker release tag"
runs-on: [self-hosted, Linux]
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pip-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
env:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
steps:
- name: Add homebrew to PATH
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
Expand All @@ -36,7 +37,7 @@ jobs:
- name: Cleanup (pre)
if: ${{ always() }}
run: |
rm -rf pip_venv
rm -rf pip_venv "$XDG_CACHE_HOME"
"$(brew --prefix)/bin/python3" -m pip cache purge

- name: Create a virtual environment
Expand Down Expand Up @@ -108,5 +109,5 @@ jobs:
- name: Cleanup (post)
if: ${{ always() }}
run: |
rm -rf pip_venv
rm -rf pip_venv "$XDG_CACHE_HOME"
"$(brew --prefix)/bin/python3" -m pip cache purge
5 changes: 3 additions & 2 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ jobs:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
RDMAV_FORK_SAFE: 1
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
steps:
- name: Cleanup
if: ${{ always() }}
run: rm -rf pip_venv
run: rm -rf pip_venv "$XDG_CACHE_HOME"

- name: Create a venv
run: |
Expand Down Expand Up @@ -107,4 +108,4 @@ jobs:
- name: Cleanup
# Belt and braces: clean up before and after the run.
if: ${{ always() }}
run: rm -rf pip_venv
run: rm -rf pip_venv "$XDG_CACHE_HOME"
9 changes: 9 additions & 0 deletions .github/workflows/pyop2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ jobs:
PETSC_ARCH: default
RDMAV_FORK_SAFE: 1
PYOP2_CI_TESTS: 1
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
timeout-minutes: 60

steps:
- name: Pre-run cleanup
if: ${{ always() }}
run: rm -rf firedrake "$XDG_CACHE_HOME"

- name: Install system dependencies
shell: bash
run: |
Expand Down Expand Up @@ -91,3 +96,7 @@ jobs:
mpiexec -n 2 --oversubscribe pytest -m "parallel[2]" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/pyop2
mpiexec -n 3 --oversubscribe pytest -m "parallel[3]" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/pyop2
timeout-minutes: 10

- name: Post-run cleanup
if: ${{ always() }}
run: rm -rf firedrake "$XDG_CACHE_HOME"
Loading