Skip to content

Commit

Permalink
Refactor: try new keys
Browse files Browse the repository at this point in the history
  • Loading branch information
rabii-chaarani committed Oct 2, 2024
1 parent 8520026 commit f54577b
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,18 @@ jobs:
run: |
pip install . --user
# Cache conda environments
- name: Cache conda environment
- name: Caching conda environment dependencies
id: cache-conda
uses: actions/cache@v4
env:
cache-name: cache-conda-env
with:
path: |
~/conda_pkgs_dir # Cache Conda package cache
key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
path: ~/conda_pkgs_dir # path for caching Conda packages
key: ${{ matrix.os }}-conda-${{ matrix.python-version }}-${{env.cache-name}}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-conda-
${{ matrix.os }}-conda-${{ matrix.python-version }}-${{env.cache-name}}-
${{ matrix.os }}-conda-${{ matrix.python-version }}-
${{ matrix.os }}-conda-
# - name: Test verification
# shell: bash -l {0}
# run: |
Expand Down Expand Up @@ -286,22 +290,20 @@ jobs:
# shell: bash -l {0}
run: |
git submodule update --init --recursive
# Restore the cached Conda environment and package cache to speed up the build
- name: Restore Conda environment cache
# Restore the cached Conda packages to speed up the build
- name: Restore cached dependencies
uses: actions/cache@v4
env:
cache-name: cache-conda-env
with:
path: |
~/conda_pkgs_dir # Restore Conda package cache
key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
path: ~/conda_pkgs_dir # Restore Conda packages cache
key: ${{ matrix.os }}-conda-${{ matrix.python-version }}-${{env.cache-name}}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-conda-${{ matrix.python-version }}-
${{ runner.os }}-conda-
# Activate the cached environment
- name: Activate Conda environment
shell: bash -l {0}
run: |
conda activate ./conda-env/${{ runner.os }}-conda-${{ matrix.python-version }}
${{ matrix.os }}-conda-${{ matrix.python-version }}-${{env.cache-name}}-
${{ matrix.os }}-conda-${{ matrix.python-version }}-
${{ matrix.os }}-conda-
continue-on-error: true

- name: Conda build
env:
Expand Down

0 comments on commit f54577b

Please sign in to comment.