-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.14 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
on:
pull_request:
branches: [ "main", "develop" ]
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: |
# Declare an array to store the module versions
python3_versions=("3.10.10-01" "3.11.8-01")
HAT_VERSION=feature/module_action
PREFIX=/usr/local/apps/hat/${HAT_VERSION}
rm -rf $PREFIX
mkdir -p $PREFIX
# Loop through the module versions
for version in "${python3_versions[@]}"
do
# Load the module for the current version
module load python3/$version
PYTHONUSERBASE=$PREFIX pip3 install --user git+https://github.com/ecmwf/hat.git@${HAT_VERSION}
module unload python3
done
cat > $PREFIX/README.txt << EOF
-- [hat] ($HAT_VERSION) [$HAT_VERSION]
EOF
sbatch_options: |
#SBATCH --job-name=cd_hat
#SBATCH --time=00:10:00
#SBATCH --qos=deploy