Skip to content

Commit

Permalink
split cahing again but right this time
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahlanzrath committed Dec 6, 2024
1 parent d9a14e6 commit cba7532
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ jobs:
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Restore cache and save updated environment after job
uses: actions/cache@v4
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: ${{ env.CONDA }}/envs
key: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}-${{ github.run_id }}
restore-keys: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
id: cache
key: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
id: restore-cache

- name: No cache found - Create new environment with Miniforge
uses: conda-incubator/setup-miniconda@v3
Expand All @@ -60,7 +59,14 @@ jobs:
channels: conda-forge
conda-remove-defaults: true
auto-activate-base: false
if: steps.cache.outputs.cache-hit != 'true'
if: steps.restore-cache.outputs.cache-hit != 'true'

- name: Save Cache if not hit
uses: actions/cache/save@v4
with:
path: ${{ env.CONDA }}/envs
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
if: steps.restore-cache.outputs.cache-hit != 'true'

- name: Install CADET-Process
run: |
Expand Down

0 comments on commit cba7532

Please sign in to comment.