Skip to content

Commit

Permalink
#68 update sundials cache action
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Apr 29, 2024
1 parent 3e5ccff commit ae54663
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/actions/setup-sundials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-sundials
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/sundials/${{ inputs.sundials_ver }}
${{ env.MODULES_DIR }}/modulefiles/sundials/${{ inputs.sundials_ver }}
key: ${{ env.OS_VERSION }}-sundials-${{ inputs.sundials_ver }}-${{ hashFiles('scripts/install_sundials.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/sundials/${{ inputs.sundials_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/sundials/${{ inputs.sundials_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-sundials-${{ inputs.sundials_ver }}-${{ hashFiles('scripts/install_sundials.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-sundials-${{ inputs.sundials_ver }}-
${{ steps.set-env.outputs.os_ver }}-sundials-${{ inputs.sundials_ver }}-
- name: build and install sundials module
if: steps.cache-sundials.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_sundials.sh --version=${{ inputs.sundials_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_sundials.sh \
--version=${{ inputs.sundials_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test sundials module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load sundials/${{ inputs.sundials_ver }}
module test sundials/${{ inputs.sundials_ver }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh

0 comments on commit ae54663

Please sign in to comment.