From 3b1cedd0c17a3508d082bba776d555bcbefdb1f3 Mon Sep 17 00:00:00 2001 From: "Lanzrath, Hannah" Date: Fri, 6 Dec 2024 17:50:16 +0100 Subject: [PATCH] Set OS dependent Paths --- .github/workflows/pipeline.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 38bb0003..9c4e6ea1 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -39,12 +39,15 @@ jobs: run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT shell: bash + - name: Set Cache Path + run: echo "CACHE_ENV_PATH=${{ runner.os == 'windows-latest' && runner.temp || '$HOME' }}/conda-cache/envs" >> $GITHUB_ENV + - name: Restore cache uses: actions/cache/restore@v4 with: enableCrossOsArchive: true - path: $HOME/miniconda3/envs - key: cross-os-python_${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }} + path: ${{env.CACHE_ENV_PATH}} + 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 @@ -62,8 +65,8 @@ jobs: - name: Save Cache if not hit uses: actions/cache/save@v4 with: - path: $HOME/miniconda3/envs - key: cross-os-python_${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }} + path: ${{env.CACHE_ENV_PATH}} + key: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }} if: steps.restore-cache.outputs.cache-hit != 'true' - name: Install CADET-Process