Skip to content

Commit

Permalink
caching
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Feb 13, 2025
1 parent 5c5ff27 commit 74c4013
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,6 @@ jobs:
printenv
- name: Cache Dependencies
# There seems to be a problem with cached NVHPC dependencies, leading to SIGILL perhaps due to slightly different architectures
if: matrix.caching
id: deps-cache
uses: pat-s/always-upload-cache@v2.1.5
with:
path: ${{ env.DEPS_DIR }}
key: deps-${{ matrix.os }}-${{ matrix.compiler }}-v1

- name: Free Disk Space (Ubuntu)
# Free up disk space for nvhpc
uses: jlumbroso/free-disk-space@main
Expand All @@ -190,6 +181,14 @@ jobs:
docker-images: true
swap-storage: true

- name: Retrieve cached dependencies
if: matrix.caching
id: deps-restore-cache
uses: actions/cache/restore@v4
with:
path: ${{ env.DEPS_DIR }}
key: deps-${{ matrix.os }}-${{ matrix.compiler }}-v1

- name: Install NVHPC compiler
if: contains( matrix.compiler, 'nvhpc' )
shell: bash -eux {0}
Expand Down Expand Up @@ -238,6 +237,15 @@ jobs:
run: |
brew install eigen
- name: Save cached dependencies
# There seems to be a problem with cached NVHPC dependencies, leading to SIGILL perhaps due to slightly different architectures
if: matrix.caching && matrix.build_type == 'Debug'
id: deps-save-cache
uses: actions/cache/save@v4
with:
path: ${{ env.DEPS_DIR }}
key: ${{ steps.deps-restore-cache.outputs.cache-primary-key }}

- name: Set Build & Test Environment
run: |
Expand Down

0 comments on commit 74c4013

Please # to comment.