Skip to content

Commit 044ceb7

Browse files
committed
add pip and wheels caching
1 parent ee70663 commit 044ceb7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ jobs:
3838
cache-dependency-glob: |
3939
pyproject.toml
4040
uv.lock
41+
42+
- name: Cache pip
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.cache/pip
46+
key: pip-${{ runner.os }}-${{ matrix.python }}-${{ matrix.mpi }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
47+
48+
- name: Cache pip wheels
49+
uses: actions/cache@v4
50+
with:
51+
path: ~/.cache/pip/wheels
52+
key: pip-wheels-${{ runner.os }}-${{ matrix.python }}-${{ matrix.mpi }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
4153

4254
# Unfortunately we must use different keys to store the same data,
4355
# otherwise GitHub will complain when multiple jobs are going to
@@ -49,7 +61,6 @@ jobs:
4961
path: ~/pysm3-data
5062
key: pysm3-data-${{ runner.os }}-${{ matrix.python }}-${{ matrix.mpi }}-${{ secrets.CACHE_VERSION }}
5163

52-
5364
- name: Register PySM3 data path
5465
run: |
5566
echo "PYSM_LOCAL_DATA=$HOME/pysm3-data" >> $GITHUB_ENV
@@ -79,6 +90,7 @@ jobs:
7990
fi
8091
env:
8192
DUCC0_OPTIMIZATION: none
93+
PIP_CACHE_DIR: ${{ runner.home }}/.cache/pip
8294

8395
- name: Tests
8496
run: uv run bash ./bin/run_tests.sh

0 commit comments

Comments
 (0)