Skip to content

hpc-module

hpc-module #6

Workflow file for this run

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=/usr/local/apps/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
module load modulemgr
modulemgr -f -m all 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