Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions .ci/hpc/build.sh.j2
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{# SPDX-FileCopyrightText: 2005- European Centre for Medium-Range Weather Forecasts (ECMWF)
SPDX-License-Identifier: Apache-2.0 #}
{% extends "ci-infrastructure/cmake-atos.sh.j2" %}
{% block set_environment %}
# Workaround: eccodes looks for its data under the prefix it was built in, not
# the staged copy; drop once eccodes finds them relative to the library.
for prefix in ${CMAKE_PREFIX_PATH//;/ }; do
for p in ${prefix//:/ }; do
if [ -d "$p/share/eccodes/samples" ]; then
export ECCODES_SAMPLES_PATH="$p/share/eccodes/samples"
export ECCODES_DEFINITION_PATH="$p/share/eccodes/definitions"
fi
done
done
echo "eccodes data: ${ECCODES_SAMPLES_PATH:-(not found)}"
{% block cmake_args %}
{% if c_flags | default("") %}
-DCMAKE_C_FLAGS={{ c_flags | default("") | quote }} \
-DCMAKE_CXX_FLAGS={{ cxx_flags | default("") | quote }} \
{% endif %}
{% endblock %}
70 changes: 36 additions & 34 deletions .ci/manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,28 +140,27 @@ python-version = "3.14"
[[matrix.python.include]]
python-version = "3.15"

# HPC off along with the ARC runners (hpc-submit): lanes disabled until they are back.
# [matrix.build-hpc]
# execution = "hpc-atos"
# container-credentials = true
# triggers = ["upstream-change", "rebuild-request"]

# [matrix.build-hpc.defaults]
# job-script = "./.ci/hpc/build.sh.j2"
# cxx-compiler = "g++-8"
# build-type = "RelWithDebInfo"
# runs-on = "hpc-submit"
# container = "eccr.ecmwf.int/private-ci-images/ubuntu24.04-internal-tools"
# site = "hpc-batch"
# platform = "hpc-atos-gnu"
# # gcc/old, not a version number: as of now gives you 8.5.0
# # `module avail gcc` lists no 8.5.0 to pin directly.
# modules = ["load prgenv/gnu", "unload gcc", "load gcc/old", "load cmake", "load ninja", "load uv", "load python3/3.11.8-01"]
# c-compiler-binary = "gcc"
# cxx-compiler-binary = "g++"
# time = "00:40:00"
[matrix.build-hpc]
execution = "hpc-atos"
container-credentials = "ECCR_PULL_ATOS_CITESTER"
triggers = ["upstream-change", "rebuild-request"]

# [[matrix.build-hpc.include]]
[matrix.build-hpc.defaults]
job-script = "./.ci/hpc/build.sh.j2"
cxx-compiler = "g++-8"
build-type = "RelWithDebInfo"
runs-on = "hpc"
container = "eccr.ecmwf.int/private-ci-images-atos-citester/ubuntu24.04-hpc-runner:latest"
site = "hpc-batch"
platform = "hpc-atos-gnu"
# gcc/old, not a version number: as of now gives you 8.5.0
# `module avail gcc` lists no 8.5.0 to pin directly.
modules = ["load prgenv/gnu", "unload gcc", "load gcc/old", "load cmake", "load ninja", "load uv", "load python3/3.11.8-01", "load aec/1.1.6"]
c-compiler-binary = "gcc"
cxx-compiler-binary = "g++"
time = "00:40:00"

[[matrix.build-hpc.include]]

# [[matrix.build-hpc.include]]
# cxx-compiler = "g++-15"
Expand All @@ -178,19 +177,22 @@ python-version = "3.15"
# cxx-compiler-binary = "nvc++"
# sccache = false

# [[matrix.build-hpc.include]]
# cxx-compiler = "icpx-2025.3.1"
# platform = "hpc-atos-intel"
# modules = ["load prgenv/intel-llvm", "unload intel", "load intel/2025.3.1", "load cmake", "load ninja"]
# c-compiler-binary = "icx"
# cxx-compiler-binary = "icpx"

# [[matrix.build-hpc.include]]
# cxx-compiler = "icpc-2023.2.0"
# platform = "hpc-atos-intel"
# modules = ["load prgenv/intel", "unload intel", "load intel/2023.2.0", "load cmake", "load ninja"]
# c-compiler-binary = "icc"
# cxx-compiler-binary = "icpc"
[[matrix.build-hpc.include]]
cxx-compiler = "icpx-2025.3.1"
platform = "hpc-atos-intel"
modules = ["load prgenv/intel-llvm", "unload intel", "load intel/2025.3.1", "load cmake", "load ninja", "load aec/1.1.6"]
c-compiler-binary = "icx"
cxx-compiler-binary = "icpx"
# icx/icpx default to fast math.
c-flags = "-fno-fast-math"
cxx-flags = "-fno-fast-math"

[[matrix.build-hpc.include]]
cxx-compiler = "icpc-2023.2.0"
platform = "hpc-atos-intel"
modules = ["load prgenv/intel", "unload intel", "load intel/2023.2.0", "load cmake", "load ninja", "load aec/1.1.6"]
c-compiler-binary = "icc"
cxx-compiler-binary = "icpc"

[packages.metkit-rust]
compiler-inputs = ["cxx-compiler"]
Expand Down
98 changes: 96 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- id: r
uses: ecmwf/ci-infrastructure/actions/resolve-deps@main
with:
matrix: build,python,rust
matrix: build,python,build-hpc,rust
token: ${{ steps.mint.outputs.token }}
rebuild-missing: 'true'
- name: Wait for the deps of build
Expand All @@ -101,6 +101,36 @@ jobs:
client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }}
app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }}

hpc-gate:
needs: ci-approval
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
run: ${{ steps.gate.outputs.run }}
steps:
- id: gate
uses: ecmwf/ci-infrastructure/actions/hpc-gate@main

wait-build-hpc:
needs: [ci-approval, resolve, rebuild-producers, hpc-gate]
if: needs.hpc-gate.outputs.run == 'true'
runs-on: ubuntu-latest
steps:
- id: mint
uses: ecmwf/ci-infrastructure/actions/mint-token@main
with:
client-id: ${{ vars.CI_READER_APP_CLIENT_ID }}
private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }}
repositories: ecbuild,eccodes,eckit,metkit,odc,stack-dependencies
permissions: contents:read actions:read
- name: Wait for the deps of build-hpc
uses: ecmwf/ci-infrastructure/actions/wait-for-deps@main
with:
matrix: ${{ needs.resolve.outputs.matrices }}
kinds: build-hpc
token: ${{ steps.mint.outputs.token }}

build:
needs: [ci-approval, resolve, rebuild-producers, pre-commit]
name: build+test (${{ matrix._resolved['job-name'] }})
Expand Down Expand Up @@ -195,6 +225,57 @@ jobs:
install-path: ${{ steps.build.outputs.install-path }}
artifact-name: ${{ matrix._resolved['own-artifact-name'] }}

build-hpc:
needs: [ci-approval, resolve, rebuild-producers, pre-commit, hpc-gate, wait-build-hpc]
if: needs.hpc-gate.outputs.run == 'true'
name: build-hpc (${{ matrix._resolved['job-name'] }})
runs-on: ${{ matrix['runs-on'] }}
container:
image: ${{ matrix.container || '' }}
credentials:
username: ${{ secrets.ECCR_PULL_ATOS_CITESTER_NAME }}
password: ${{ secrets.ECCR_PULL_ATOS_CITESTER_TOKEN }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.resolve.outputs.matrices).build-hpc }}
steps:
- name: Announce image
uses: ecmwf/ci-infrastructure/actions/announce-image@main
- id: mint
uses: ecmwf/ci-infrastructure/actions/mint-token@main
with:
client-id: ${{ vars.CI_READER_APP_CLIENT_ID }}
private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }}
repositories: ecbuild,eccodes,eckit,metkit,odc,stack-dependencies
permissions: contents:read actions:read
- uses: ecmwf/ci-infrastructure/actions/checkout-under-test@main
with:
persist-credentials: false
allow-unsafe-pr-checkout: ${{ github.event_name == 'pull_request_target' }}
- name: Fetch resolved deps
id: deps
uses: ecmwf/ci-infrastructure/actions/fetch-deps@main
with:
deps-json: ${{ toJSON(matrix._resolved.deps) }}
token: ${{ steps.mint.outputs.token }}
stage-only: 'true'
- name: Print dependency table
uses: ecmwf/ci-infrastructure/actions/print-dep-table@main
with:
resolved: ${{ toJSON(matrix._resolved) }}
own-source: ''
- name: Build on HPC
id: build
uses: ecmwf/ci-infrastructure/actions/build-on-hpc@main
with:
site: ${{ matrix.site }}
job-script: ${{ matrix.job-script }}
matrix-leg: ${{ toJSON(matrix) }}
artifact-name: ${{ matrix._resolved['own-artifact-name'] }}
cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }}
work-dir: ${{ vars.HPC_CI_WORK_DIR }}
remote-work-dir: ${{ vars.HPC_CI_REMOTE_WORK_DIR }}

rust:
needs: [ci-approval, resolve, rebuild-producers, build]
name: rust (${{ matrix._resolved['job-name'] }})
Expand Down Expand Up @@ -237,10 +318,23 @@ jobs:
package: metkit
cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }}

collect-result-hpc:
name: collect HPC results
if: always() && needs['hpc-gate'].outputs.run == 'true'
needs: [ci-approval, hpc-gate, wait-build-hpc, build-hpc]
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: ecmwf/ci-infrastructure/actions/ci-result@main
with:
needs: ${{ toJSON(needs) }}
context: ci-result/hpc-atos

ci-result:
name: collect results
if: always()
needs: [ci-approval, pre-commit, resolve, build, python, rust]
needs: [ci-approval, hpc-gate, pre-commit, resolve, build, python, rust]
runs-on: ubuntu-latest
permissions:
statuses: write
Expand Down
Loading