diff --git a/.github/actions/setup-sundials/action.yml b/.github/actions/setup-sundials/action.yml index 45be535..080ba68 100644 --- a/.github/actions/setup-sundials/action.yml +++ b/.github/actions/setup-sundials/action.yml @@ -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