From 9e7b196355cd5e4c9603050f35973b23db35c2bc Mon Sep 17 00:00:00 2001 From: Zied Aouini Date: Fri, 16 Apr 2021 18:49:28 +0200 Subject: [PATCH] Improve caching for PyPy CI jobs. --- .github/workflows/build_and_publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 2522d7a..30d366d 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -26,15 +26,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Display Python version + - name: Get pip cache path + id: get-pip-path run: | python -c "import sys; print(sys.version)" + id=$(echo ${{ env.pythonLocation }} | sed 's/\/bin//g') + echo "::set-output name=id::$id" + - name: Pip cache uses: actions/cache@v2 id: pip-cache with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }} + path: ${{ steps.get-pip-path.outputs.id }} + key: ${{ steps.get-pip-path.outputs.id }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }} - name: Install ubuntu Prerequisites if: startsWith(matrix.os, 'ubuntu') run: |