diff --git a/.github/workflows/build-hpc.yml b/.github/workflows/build-hpc.yml index b9d227d0..375ea6ee 100644 --- a/.github/workflows/build-hpc.yml +++ b/.github/workflows/build-hpc.yml @@ -44,6 +44,12 @@ jobs: #SBATCH --gpus-per-task=1 #SBATCH --mem=200G #SBATCH --qos=dg + modules: + - cmake + - ninja + - prgenv/nvidia + - hpcx-openmpi/2.14.0-cuda + - fftw runs-on: [self-hosted, linux, hpc] env: @@ -55,18 +61,14 @@ jobs: troika_user: ${{ secrets.HPC_CI_SSH_USER }} sbatch_options: ${{ matrix.sbatch_options }} template_data: | - modules: - - cmake - - ninja - - ecbuild - - prgenv/nvidia - - hpcx-openmpi/2.14.0-cuda - - fftw + modules: [${{ join(matrix.modules, ', ' }}] cmake_options: - -DENABLE_MPI=ON - -DENABLE_ACC=ON - -DENABLE_GPU=ON dependencies: + ecmwf/ecbuild: + version: develop ecmwf-ifs/fiat: version: develop cmake_options: @@ -75,22 +77,24 @@ jobs: {% for module in modules %} module load {{module}} {% endfor %} - + BASEDIR=$PWD {% for name, options in dependencies.items() %} mkdir -p {{name}} pushd {{name}} - git init git remote add origin ${{ github.server_url }}/{{name}} git fetch origin {{options['version']}} git reset --hard FETCH_HEAD - - cmake -G Ninja -S . -B build {{ options['cmake_options']|join(' ') }} + cmake -G Ninja -S . -B build \ + {% for name in dependencies %} + {% set org, proj = name.split('/') %} + -D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \ + {% endfor %} + {{ options['cmake_options']|join(' ') }} cmake --build build - cmake --install build --prefix install + cmake --install build --prefix installation popd {% endfor %} - mkdir -p ${{ github.repository }} pushd ${{ github.repository }} git init @@ -98,13 +102,11 @@ jobs: git fetch origin ${{ github.sha }} git reset --hard FETCH_HEAD popd - cmake -G Ninja -S ${{ github.repository }} -B build \ {% for name in dependencies %} {% set org, proj = name.split('/') %} - -D{{proj}}_ROOT=$PWD/{{name}}/install \ + -D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \ {% endfor %} {{ cmake_options|join(' ') }} - cmake --build build ctest --test-dir build