Use pip cache on GitHub Actions

Using the method outlined in https://github.com/actions/cache/blob/main/examples.md#using-pip-to-get-cache-location
This commit is contained in:
Sajith Sasidharan 2021-01-18 11:02:55 -05:00
parent fa1a8e8371
commit 27a122088c

View File

@ -46,6 +46,19 @@ jobs:
pip install --upgrade codecov tox setuptools pip
pip list
- name: Get pip cache directory
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Display tool versions
run: python misc/build_helpers/show-tool-versions.py
@ -117,6 +130,19 @@ jobs:
pip install --upgrade tox pip
pip list
- name: Get pip cache directory
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Display tool versions
run: python misc/build_helpers/show-tool-versions.py
@ -169,6 +195,19 @@ jobs:
pip install --upgrade tox pip
pip list
- name: Get pip cache directory
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Display tool versions
run: python misc/build_helpers/show-tool-versions.py