Skip to content

Commit

Permalink
Add ci-hpc plan to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
reuterbal committed Nov 27, 2024
1 parent 04353c2 commit 02173e2
Showing 1 changed file with 122 additions and 0 deletions.
122 changes: 122 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,125 @@ jobs:
# uses: codecov/codecov-action@v2
# with:
# files: ${{ steps.build-test.outputs.coverage_file }}

ci-hpc:
name: ci-hpc

strategy:
fail-fast: false # false: try to complete all jobs

matrix:
name:
- ac-gpu nvhpc sp

include:
- name: ac-gpu nvhpc sp
site: ac-batch
sbatch_options: |
#SBATCH --time=00:20:00
#SBATCH --nodes=1
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=32
#SBATCH --gpus-per-task=1
#SBATCH --mem=0
#SBATCH --qos=dg
runs-on: [self-hosted, linux, hpc]
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: ecmwf-actions/reusable-workflows/ci-hpc-generic@v2
with:
site: ${{ matrix.site }}
troika_user: ${{ secrets.HPC_CI_SSH_USER }}
sbatch_options: ${{ matrix.sbatch_options }}
template_data: |
modules:
- cmake
- fcm
- ninja
- ecbuild
- prgenv/nvidia
- hpcx-openmpi/2.14.0-cuda
- python3
cmake_options:
- -DENABLE_MPI=ON
- -DENABLE_LOKI=ON
- -DENABLE_ACC=ON
- -DENABLE_CUDA=ON
- -DENABLE_GPU_AWARE_MPI=ON
- -DENABLE_SINGLE_PRECISION=ON
dependencies:
ecmwf/eccodes:
version: develop
cmake_options:
- -DENABLE_MEMFS=ON
- -DENABLE_JPG=OFF
- -DENABLE_PNG=OFF
ecmwf/fckit:
version: 0.13.0
cmake_options:
- -DENABLE_TESTS=OFF
- -DENABLE_FCKIT_VENV=ON
ecmwf-ifs/fiat:
version: 1.4.1
cmake_options:
- -DENABLE_MPI=ON
- -DENABLE_SINGLE_PRECISION=ON
- -DENABLE_DOUBLE_PRECISION=OFF
ecmwf-ifs/field_api:
version: v0.3.1
cmake_options:
- -DENABLE_TESTS=OFF
- -DENABLE_ACC=ON
- -DENABLE_CUDA=ON
- -DENABLE_SINGLE_PRECISION=ON
- -DENABLE_DOUBLE_PRECISION=OFF
ecmwf-ifs/loki:
version: v0.2.9
cmake_options:
- -DENABLE_TESTS=OFF
template: |
{% 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 \
{% 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 installation
popd
{% endfor %}
mkdir -p ${{ github.repository }}
pushd ${{ github.repository }}
git init
git remote add origin ${{ github.server_url }}/${{ github.repository }}
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=$BASEDIR/{{name}}/installation \
{% endfor %}
{{ cmake_options|join(' ') }}
cmake --build build
ctest --test-dir build

0 comments on commit 02173e2

Please sign in to comment.