Skip to content

Commit

Permalink
Update cache action
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Feb 4, 2024
1 parent a14573d commit 6fc65d3
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/gfortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ jobs:
# pFUnit library is used to build and run unit tests
- name: pFUnit build Cache
id: pfunit-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pfunit/build/installed
# To force a pFUnit rebuild (bust the cache), make a change to install_pfunit.sh
key: ${{ runner.os }}-ubuntu20.04-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
save-always: true

- name: Download and build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -175,7 +176,7 @@ jobs:

- name: TCBP build cache
id: tcpb-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/tcpb-cpp/lib
# To force a rebuild (bust the cache), make a change to install_tcpb.sh
Expand Down Expand Up @@ -226,10 +227,11 @@ jobs:
- name: pFUnit build Cache
id: pfunit-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pfunit/build/installed
key: ${{ runner.os }}-ubuntu22.04-pfunit-gfortran${{ env.GCC_V }}-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
save-always: true

- name: Download and build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -264,10 +266,11 @@ jobs:

- name: pFUnit build Cache
id: pfunit-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pfunit/build/installed
key: ${{ runner.os }}-ubuntu22.04-pfunit-gfortran-default-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
save-always: true

- name: Download and build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -332,10 +335,11 @@ jobs:
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
- name: MPICH build Cache
id: mpich-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/mpich/${{ env.MPICH_V }}/install
key: ${{runner.os}}-ubuntu20.04-mpich${{ env.MPICH_V }}-gfortran${{ env.GCC_V }}-${{hashFiles('dev_scripts/install_mpich.sh')}}
save-always: true

- name: Build and Install MPICH
if: steps.mpich-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -385,10 +389,11 @@ jobs:
fetch-depth: 2
- name: OpenMPI build cache
id: openmpi-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/openmpi/${{ env.OPENMPI_V }}/install
key: ${{runner.os}}-ubuntu20.04-openmpi${{ env.OPENMPI_V }}-gfortran-default-${{hashFiles('dev_scripts/install_openmpi.sh')}}
save-always: true

- name: Build and Install OpenMPI
if: steps.openmpi-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -429,18 +434,19 @@ jobs:
fetch-depth: 2
- name: Plumed build cache
id: plumed-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/plumed/${{ env.PLUMED_V }}/install
key: ${{runner.os}}-ubuntu20.04-plumed${{env.PLUMED_V}}-gcc-default-${{hashFiles('dev_scripts/install_plumed.sh')}}
save-always: true

- name: Build and Install PLUMED
if: steps.plumed-cache.outputs.cache-hit != 'true'
run: ./dev_scripts/install_plumed.sh ${HOME}/plumed ${PLUMED_V}

- name: pFUnit build Cache
id: pfunit-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pfunit/build/installed
key: ${{ runner.os }}-ubuntu20.04-pfunit-gfortran-default-${{ hashFiles('dev_scripts/install_pfunit.sh') }}
Expand Down

0 comments on commit 6fc65d3

Please sign in to comment.