Skip to content

Commit

Permalink
Enable pip caching for GitHub Actions
Browse files Browse the repository at this point in the history
Enable pip caching in order to avoid repeatedly rebuilding all
the PyPy wheels for source packages.  This is inspired by discussion
in psf/requests#6496 and it may help with
the PyPy CI failures.
  • Loading branch information
mgorny committed Aug 13, 2023
1 parent c62ab87 commit 6dbcfb8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# from https://github.com/actions/cache/blob/main/examples.md#python---pip
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
# the action does not permit updating an existing cache, so we need
# unique keys
key: ${{ runner.os }}-pip-${{ github.sha }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install .
Expand Down

0 comments on commit 6dbcfb8

Please sign in to comment.