Skip to content

Commit

Permalink
CI: Correct cache setup
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Nov 20, 2023
1 parent ac2bd48 commit 6fe38e8
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,40 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install ${{matrix.mpi}}
run: |
case "${{matrix.mpi}}" in
MPICH)
sudo apt-get update
sudo apt-get install libmpich-dev
;;
OpenMPI)
;;
esac
- name: Restore dependencies
id: cache-restore
id: cache
uses: actions/cache/restore@v3
with:
path: /usr/local
key: ${{runner.os}}-${{matrix.mpi}}-dependencies

- name: Install ${{matrix.mpi}}
- name: Build ${{matrix.mpi}}
if: steps.cache.outputs.cache-hit != 'true'
run: |
case "${{matrix.mpi}}" in
MPICH)
sudo apt-get update
sudo apt-get install libmpich-dev
;;
OpenMPI)
./.github/workflows/install-openmpi.sh
;;
esac
- name: Save dependencies
id: cache-save
uses: actions/cache/save@v3
with:
path: /usr/local
key: ${{steps.cache-restore.outputs.cache-primary-key}}
key: ${{steps.cache.cache-primary-key}}

- name: Configure
run: |
Expand Down

0 comments on commit 6fe38e8

Please sign in to comment.