|
48 | 48 | path: ${{ steps.pip-cache.outputs.dir }} |
49 | 49 | key: ${{ matrix.platform.runner }}-pip-${{ hashFiles('pyproject.toml') }} |
50 | 50 | # Build a virtualenv, but only if it doesn't already exist |
51 | | - - name: Populate pip cache |
52 | | - run: pip install -r requirements/dev_${{ RUNNER_OS }}_requirements.txt |
| 51 | + - name: Find out Python version |
| 52 | + run: echo "PYVERSION=$(python3 tools/py_version.py)" >> $GITHUB_ENV |
| 53 | + - name: Install dependencies |
| 54 | + run: | |
| 55 | + pip install --require-hashes --no-deps -r requirements/dev_${{ RUNNER_OS }}_py${{ env.PYVERSION }}_requirements.txt |
53 | 56 | if: steps.cache.outputs.cache-hit != 'true' |
54 | 57 | - name: Save cache |
55 | 58 | id: cache-save |
@@ -83,11 +86,13 @@ jobs: |
83 | 86 | with: |
84 | 87 | path: ${{ steps.pip-cache.outputs.dir }} |
85 | 88 | # The cache key depends on requirements.txt |
86 | | - key: ${{ runner.os }}-pip-${{ hashFiles('requirements/dev_Linux_requirements.txt') }} |
| 89 | + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/dev_Linux_*_requirements.txt') }} |
87 | 90 | # Build a virtualenv, but only if it doesn't already exist |
88 | | - - name: Populate pip cache |
| 91 | + - name: Find out Python version |
| 92 | + run: echo "PYVERSION=$(python3 tools/py_version.py)" >> $GITHUB_ENV |
| 93 | + - name: Install dependencies |
89 | 94 | run: | |
90 | | - python -m pip install --require-hashes --no-deps -r requirements/dev_Linux_requirements.txt |
| 95 | + pip install --require-hashes --no-deps -r requirements/dev_${{ RUNNER_OS }}_py${{ env.PYVERSION }}_requirements.txt |
91 | 96 | if: steps.cache.outputs.cache-hit != 'true' |
92 | 97 | - name: Save cache |
93 | 98 | id: cache-save |
|
0 commit comments