diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index 8d5166e1d..ddabe6560 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -32,8 +32,8 @@ jobs: run: | echo "Current Cached files list" gh cache list - echo "Deleting cached files with pattern: ${{ runner.os }}-venv-${{ matrix.combos.python_version }}-" - for cache_key in $(gh cache list --json key -q ".[] | select(.key | startswith(\"${{ runner.os }}-venv-${{ matrix.combos.python_version }}-\")) | .key"); do + echo "Deleting cached files with pattern: ${{ runner.os }}-venv-${{ matrix.combos.venv_suffix }}-" + for cache_key in $(gh cache list --json key -q ".[] | select(.key | startswith(\"${{ runner.os }}-venv-${{ matrix.combos.venv_suffix }}-\")) | .key"); do echo "Deleting cache with key: $cache_key" gh cache delete "$cache_key" done @@ -41,8 +41,8 @@ jobs: # Update the matplotlib version if needed later - name: Set up virtual environment run: | - python -m venv .venv-${{ matrix.combos.python_version }} - source .venv-${{ matrix.combos.python_version }}/bin/activate + python -m venv .venv-${{ matrix.combos.venv_suffix }} + source .venv-${{ matrix.combos.venv_suffix }}/bin/activate python -m pip install --upgrade pip pip install -r devtools/dev-requirements.txt pip install matplotlib==3.9.2 @@ -51,12 +51,12 @@ jobs: id: cache-env uses: actions/cache@v4 with: - path: .venv-${{ matrix.combos.python_version }} - key: ${{ runner.os }}-venv-${{ matrix.combos.python_version }}-${{ hashFiles('devtools/dev-requirements.txt', 'requirements.txt') }} + path: .venv-${{ matrix.combos.venv_suffix }} + key: ${{ runner.os }}-venv-${{ matrix.combos.venv_suffix }}-${{ hashFiles('devtools/dev-requirements.txt', 'requirements.txt') }} - name: Verify virtual environment activation run: | - source .venv-${{ matrix.combos.python_version }}/bin/activate + source .venv-${{ matrix.combos.venv_suffix }}/bin/activate which python python --version pip --version