diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index 106542a7904..10ef86a8daf 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -47,6 +47,8 @@ runs: SPACK_VERSION: ${{ inputs.spack_version }} run: | CI/dependencies/setup_spack.sh + bin/spack list > /dev/null + rm -rf spack/.git tar cf spack.tar spack/ tar cf spack_cache.tar -C ~ .spack @@ -54,7 +56,9 @@ runs: if: steps.cache-restore.outputs.cache-hit != 'true' uses: actions/cache/save@v3 with: - path: spack.tar.zst + path: | + spack.tar + spack_cache.tar key: spack-v2-${{ inputs.spack_version }}-${{ hashFiles('CI/dependencies/setup_spack.sh') }} - name: Install dependencies diff --git a/CI/dependencies/setup_spack.sh b/CI/dependencies/setup_spack.sh index dba3939d282..4cb0772e01e 100755 --- a/CI/dependencies/setup_spack.sh +++ b/CI/dependencies/setup_spack.sh @@ -10,10 +10,5 @@ if [ ! -d "spack" ]; then pushd spack > /dev/null git config user.name 'CI' git config user.email '<>' - - rm -rf .git - - echo "Populating the repository index" - bin/spack list > /dev/null popd > /dev/null fi