hpc-module #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: hpc-module | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| module-name: | |
| description: 'Module name' | |
| required: true | |
| type: string | |
| module-tag: | |
| description: 'Module tag' | |
| required: false | |
| default: 'NOT_DEFINED' | |
| type: string | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| install_module: | |
| runs-on: [hpc] | |
| steps: | |
| - uses: ecmwf-actions/reusable-workflows/ci-hpc-generic@v2 | |
| with: | |
| troika_user: ${{ secrets.HPC_CI_SSH_USER }} | |
| template: | | |
| MODULE_VERSION=${{ github.event_name == 'workflow_dispatch' && inputs.module-name || github.ref_name }} | |
| MODULE_TAG=${{ github.event_name == 'workflow_dispatch' && inputs.module-tag || 'default'}} | |
| HAT_BRANCH=${{ github.ref_name }} | |
| PREFIX=${{ secrets.HPC_APPS_DIR }}/hat/${MODULE_VERSION} | |
| rm -rf $PREFIX | |
| mkdir -p $PREFIX | |
| # Load the default python module | |
| module load python3 | |
| PYTHONUSERBASE=$PREFIX pip3 install --user git+https://github.com/ecmwf/hat.git@${HAT_BRANCH} | |
| module unload python3 | |
| software-sync -s local -p hat -t aa,ab,ac,ad | |
| module load modulemgr | |
| modulemgr -f -m aa,ab,ac,ad sync hat | |
| if [ $MODULE_TAG != 'NOT_DEFINED' ] | |
| then | |
| modulemgr -f -m all tag -o hat $MODULE_VERSION $MODULE_TAG | |
| fi | |
| sbatch_options: | | |
| #SBATCH --job-name=cd_hat | |
| #SBATCH --time=00:10:00 | |
| #SBATCH --qos=deploy |