From 506f47bf2aa0904c30953a8427110c2830332ae9 Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Thu, 21 Nov 2024 21:16:01 +0100 Subject: [PATCH] Add build-hpc workflow --- .github/build-hpc-config.yml | 20 +++++++++++++++ .github/workflows/build-hpc.yml | 43 +++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 27 +++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 .github/build-hpc-config.yml create mode 100644 .github/workflows/build-hpc.yml diff --git a/.github/build-hpc-config.yml b/.github/build-hpc-config.yml new file mode 100644 index 000000000..05ba56c4b --- /dev/null +++ b/.github/build-hpc-config.yml @@ -0,0 +1,20 @@ +build: + modules: + - ecbuild + - cmake + - ninja + - prgenv/nvidia + - hpcx-openmpi + - fftw + parallel: 32 + cmake_options: + - -DENABLE_MPI=ON + - -DENABLE_FFTW=ON + - -DENABLE_ACC=ON + - -DENABLE_GPU=ON + force_build: true + env: + - GH_TOKEN=${GH_TOKEN} + compiler_cc: nvc + compiler_cxx: nvc++ + compiler_fc: nvfortran diff --git a/.github/workflows/build-hpc.yml b/.github/workflows/build-hpc.yml new file mode 100644 index 000000000..f324d54d0 --- /dev/null +++ b/.github/workflows/build-hpc.yml @@ -0,0 +1,43 @@ +name: build-hpc + +# Controls when the action will run +on: + + # Trigger the workflow on all pull requests + pull_request: ~ + + # Allow workflow to be dispatched on demand + workflow_dispatch: ~ + +env: + ECTRANS_TOOLS: ${{ github.workspace }}/.github/tools + CTEST_PARALLEL_LEVEL: 1 + CACHE_SUFFIX: v1 # Increase to force new cache to be created + +jobs: + ci-hpc: + name: ci-hpc + runs-on: [self-hosted, linux, hpc] + env: + GH_TOKEN: ${{ secrets.GH_REPO_READ_TOKEN }} + steps: + - uses: ecmwf-actions/reusable-workflows/ci-hpc@v2 + with: + # github_user: ${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }} + # github_token: ${{ secrets.GH_REPO_READ_TOKEN }} + site: ac-batch + troika_user: ${{ secrets.HPC_CI_SSH_USER }} + # repository: ecmwf-ifs/ectrans@${{ github.event.pull_request.head.sha || github.sha }} + build_config: .github/build-hpc-config.yml + dependencies: | + ecmwf-ifs/fiat + dependency_branch: develop + dependency_cmake_options: | + ecmwf-ifs/fiat: "-G Ninja -DENABLE_TESTS=OFF -DENABLE_MPI=ON" + sbatch_options: | + #SBATCH --time=00:20:00 + #SBATCH --nodes=1 + #SBATCH --ntasks=32 + #SBATCH --gpus=1 + #SBATCH --mem=128G + #SBATCH --qos=dg diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c08473597..c57ea3d5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -209,3 +209,30 @@ jobs: # uses: codecov/codecov-action@v2 # with: # files: ${{ steps.build-test.outputs.coverage_file }} + + ci-hpc: + name: ci-hpc + runs-on: [self-hosted, linux, hpc] + env: + GH_TOKEN: ${{ secrets.GH_REPO_READ_TOKEN }} + steps: + - uses: ecmwf-actions/reusable-workflows/ci-hpc@v2 + with: + # github_user: ${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }} + # github_token: ${{ secrets.GH_REPO_READ_TOKEN }} + site: ac-batch + troika_user: ${{ secrets.HPC_CI_SSH_USER }} + # repository: ecmwf-ifs/ectrans@${{ github.event.pull_request.head.sha || github.sha }} + build_config: .github/build-hpc-config.yml + dependencies: | + ecmwf-ifs/fiat + dependency_branch: develop + dependency_cmake_options: | + ecmwf-ifs/fiat: "-G Ninja -DENABLE_TESTS=OFF -DENABLE_MPI=ON" + sbatch_options: | + #SBATCH --time=00:20:00 + #SBATCH --nodes=1 + #SBATCH --ntasks=32 + #SBATCH --gpus=1 + #SBATCH --mem=128G + #SBATCH --qos=dg