Skip to content

Commit

Permalink
#68 update xercesc cache action
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Apr 29, 2024
1 parent 1caa035 commit 4545417
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/actions/setup-xercesc/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-xercesc
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/xercesc/${{ inputs.xercesc_ver }}
${{ env.MODULES_DIR }}/modulefiles/xercesc/${{ inputs.xercesc_ver }}
key: ${{ env.OS_VERSION }}-xercesc-${{ inputs.xercesc_ver }}-${{ hashFiles('scripts/install_xercesc.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/xercesc/${{ inputs.xercesc_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/xercesc/${{ inputs.xercesc_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-xercesc-${{ inputs.xercesc_ver }}-${{ hashFiles('scripts/install_xercesc.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-xercesc-${{ inputs.xercesc_ver }}-
${{ steps.set-env.outputs.os_ver }}-xercesc-${{ inputs.xercesc_ver }}-
- name: build and install xercesc module
if: steps.cache-xercesc.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_xercesc.sh --version=${{ inputs.xercesc_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_xercesc.sh \
--version=${{ inputs.xercesc_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test xercesc module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load xercesc/${{ inputs.xercesc_ver }}
module test xercesc/${{ inputs.xercesc_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 4545417

Please sign in to comment.