From 0399eb8898911a45a2452617e5ef25467a354800 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Fri, 2 Oct 2026 10:05:57 +0200 Subject: [PATCH] ci: build through job-script recipes; hpc lane is hpc-atos Co-Authored-By: Claude Opus 5.5 --- .ci/build.sh.j2 | 3 ++ .ci/hpc/build.sh.j2 | 2 +- .ci/manifest.toml | 7 +--- .github/actions/build-eckit/action.yml | 41 ------------------- .github/workflows/ci.yml | 15 ++----- ...pc.yml => cross-repo-trigger-hpc-atos.yml} | 2 +- .github/workflows/cross-repo-trigger.yml | 16 ++------ ...pc.yml => trigger-downstream-hpc-atos.yml} | 10 ++--- 8 files changed, 20 insertions(+), 76 deletions(-) create mode 100644 .ci/build.sh.j2 delete mode 100644 .github/actions/build-eckit/action.yml rename .github/workflows/{cross-repo-trigger-hpc.yml => cross-repo-trigger-hpc-atos.yml} (99%) rename .github/workflows/{trigger-downstream-hpc.yml => trigger-downstream-hpc-atos.yml} (95%) diff --git a/.ci/build.sh.j2 b/.ci/build.sh.j2 new file mode 100644 index 000000000..52308894e --- /dev/null +++ b/.ci/build.sh.j2 @@ -0,0 +1,3 @@ +{# SPDX-FileCopyrightText: 1996- European Centre for Medium-Range Weather Forecasts (ECMWF) + SPDX-License-Identifier: Apache-2.0 #} +{% extends "ci-infrastructure/cmake-runner.sh.j2" %} diff --git a/.ci/hpc/build.sh.j2 b/.ci/hpc/build.sh.j2 index b4602ce20..c0d0114bd 100644 --- a/.ci/hpc/build.sh.j2 +++ b/.ci/hpc/build.sh.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: 1996- European Centre for Medium-Range Weather Forecasts (ECMWF) SPDX-License-Identifier: Apache-2.0 #} -{% extends "ci-infrastructure/cmake-build.sh.j2" %} +{% extends "ci-infrastructure/cmake-atos.sh.j2" %} {% block preflight %} {{ super() }} for tool in bison flex; do diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 7458d0439..2852894c4 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -28,6 +28,7 @@ ref = "master" compiler-inputs = ["cxx-compiler"] [matrix.build.defaults] +job-script = "./.ci/build.sh.j2" build-type = "RelWithDebInfo" runs-on = "arc-runner-very-large" ctest-args = '-j "$(nproc)"' @@ -46,10 +47,6 @@ platform = "ubuntu-24.04" [matrix.build] triggers = ["upstream-change", "rebuild-request"] -action = "./.github/actions/build-eckit" -forwarded-inputs = ["c-compiler", "cxx-compiler", "build-type"] -forwarded-deps-outputs = ["cmake-prefix-path"] -ctest = true [matrix.build-hpc.defaults] job-script = "./.ci/hpc/build.sh.j2" @@ -69,7 +66,7 @@ cxx = "g++" time = "00:40:00" [matrix.build-hpc] -execution = "hpc" +execution = "hpc-atos" container-credentials = true triggers = ["upstream-change", "rebuild-request"] forwarded-deps-outputs = ["cmake-prefix-path"] diff --git a/.github/actions/build-eckit/action.yml b/.github/actions/build-eckit/action.yml deleted file mode 100644 index 1304a6ba0..000000000 --- a/.github/actions/build-eckit/action.yml +++ /dev/null @@ -1,41 +0,0 @@ -# SPDX-FileCopyrightText: 1996- European Centre for Medium-Range Weather Forecasts (ECMWF) -# SPDX-License-Identifier: Apache-2.0 - -name: Build eckit from source -description: > - Builds and installs the checked-out eckit with - ecmwf/ci-infrastructure/actions/cmake-build, which documents the inputs. - -inputs: - cmake-prefix-path: - description: 'Prefixes of the resolved deps (ecbuild, stack-deps)' - required: true - c-compiler: - description: 'C compiler, e.g. clang-18, gcc-13' - required: true - cxx-compiler: - description: 'C++ compiler, e.g. clang++-18, g++-13' - required: true - build-type: - description: 'CMake build type' - required: true - -outputs: - install-path: - description: 'Absolute path where eckit is installed' - value: ${{ steps.build.outputs.install-path }} - build-dir: - description: 'Absolute path of the build tree, for ctest' - value: ${{ steps.build.outputs.build-dir }} - -runs: - using: composite - steps: - - id: build - uses: ecmwf/ci-infrastructure/actions/cmake-build@main - with: - package: eckit - cmake-prefix-path: ${{ inputs.cmake-prefix-path }} - c-compiler: ${{ inputs.c-compiler }} - cxx-compiler: ${{ inputs.cxx-compiler }} - build-type: ${{ inputs.build-type }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7a0c4481..a0c237bf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,19 +97,12 @@ jobs: - name: Build eckit id: build - uses: ./.github/actions/build-eckit + uses: ecmwf/ci-infrastructure/actions/run-job-script@main with: + job-script: ${{ matrix.job-script }} + matrix-leg: ${{ toJSON(matrix) }} + package: eckit cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }} - c-compiler: ${{ matrix.c-compiler }} - cxx-compiler: ${{ matrix.cxx-compiler }} - build-type: ${{ matrix.build-type }} - - # Invocation comes from .ci/manifest.toml's [matrix.build], the same place - # the generated cross-repo-trigger.yml renders its Test step from. Spelling - # it out again here is how the two lanes drift apart. - - name: Test - if: ${{ matrix._resolved.ctest }} - run: ctest --test-dir "${{ steps.build.outputs.build-dir }}" --output-on-failure ${{ matrix._resolved['ctest-args'] }} - name: Publish eckit uses: ecmwf/ci-infrastructure/actions/publish-artifact@main diff --git a/.github/workflows/cross-repo-trigger-hpc.yml b/.github/workflows/cross-repo-trigger-hpc-atos.yml similarity index 99% rename from .github/workflows/cross-repo-trigger-hpc.yml rename to .github/workflows/cross-repo-trigger-hpc-atos.yml index f3a336574..2d79b7c87 100644 --- a/.github/workflows/cross-repo-trigger-hpc.yml +++ b/.github/workflows/cross-repo-trigger-hpc-atos.yml @@ -71,7 +71,7 @@ on: type: string default: main concurrency: - group: cross-repo-trigger-hpc-eckit-${{ github.ref }} + group: cross-repo-trigger-hpc-atos-eckit-${{ github.ref }} cancel-in-progress: false env: ARTIFACT_POLL_INTERVAL: ${{ vars.ARTIFACT_POLL_INTERVAL || '60' }} diff --git a/.github/workflows/cross-repo-trigger.yml b/.github/workflows/cross-repo-trigger.yml index bd9083fb0..d464cc197 100644 --- a/.github/workflows/cross-repo-trigger.yml +++ b/.github/workflows/cross-repo-trigger.yml @@ -176,15 +176,9 @@ jobs: fi printf '%s' "$val" } - c_compiler=$(require '."c-compiler"' c-compiler) - cxx_compiler=$(require '."cxx-compiler"' cxx-compiler) - build_type=$(require '."build-type"' build-type) deps_json=$(require '._resolved.deps | tojson' '_resolved.deps') own_artifact_name=$(require '._resolved."own-artifact-name"' '_resolved.own-artifact-name') { - echo "c-compiler=${c_compiler}" - echo "cxx-compiler=${cxx_compiler}" - echo "build-type=${build_type}" echo "deps-json=${deps_json}" echo "own-artifact-name=${own_artifact_name}" } >> "$GITHUB_OUTPUT" @@ -196,14 +190,12 @@ jobs: token: ${{ steps.mint.outputs.token }} - name: Build id: build - uses: ./.github/actions/build-eckit + uses: ecmwf/ci-infrastructure/actions/run-job-script@main with: + job-script: ${{ matrix.job-script }} + matrix-leg: ${{ toJSON(matrix) }} + package: eckit cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }} - c-compiler: ${{ steps.m.outputs.c-compiler }} - cxx-compiler: ${{ steps.m.outputs.cxx-compiler }} - build-type: ${{ steps.m.outputs.build-type }} - - name: Test - run: ctest --test-dir "${{ steps.build.outputs.build-dir }}" --output-on-failure ${{ matrix._resolved['ctest-args'] }} - name: Publish uses: ecmwf/ci-infrastructure/actions/publish-artifact@main with: diff --git a/.github/workflows/trigger-downstream-hpc.yml b/.github/workflows/trigger-downstream-hpc-atos.yml similarity index 95% rename from .github/workflows/trigger-downstream-hpc.yml rename to .github/workflows/trigger-downstream-hpc-atos.yml index b42784d70..853ad299c 100644 --- a/.github/workflows/trigger-downstream-hpc.yml +++ b/.github/workflows/trigger-downstream-hpc-atos.yml @@ -12,7 +12,7 @@ on: types: - completed concurrency: - group: trigger-downstream-hpc-${{ github.event.workflow_run.head_sha }} + group: trigger-downstream-hpc-atos-${{ github.event.workflow_run.head_sha }} cancel-in-progress: true jobs: context: @@ -81,7 +81,7 @@ jobs: gh api -X POST \ "/repos/${{ github.repository }}/statuses/${{ needs.context.outputs.head-sha }}" \ -f state=pending \ - -f context='downstream/hpc' \ + -f context='downstream/hpc-atos' \ -f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ -f description='Downstream HPC tests running' needs: @@ -100,7 +100,7 @@ jobs: gh api -X POST \ "/repos/${{ github.repository }}/statuses/${{ needs.context.outputs.head-sha }}" \ -f state=failure \ - -f context='downstream/hpc' \ + -f context='downstream/hpc-atos' \ -f target_url="${{ needs.context.outputs.ci-url }}" \ -f description="${{ needs.context.outputs.ci-summary }}; downstream HPC not run" needs: @@ -112,7 +112,7 @@ jobs: - context - label-gate - validate - uses: ecmwf/eccodes/.github/workflows/cross-repo-trigger-hpc.yml@develop + uses: ecmwf/eccodes/.github/workflows/cross-repo-trigger-hpc-atos.yml@develop with: from-repo: ${{ github.repository }} from-sha: ${{ needs.context.outputs.head-sha }} @@ -148,6 +148,6 @@ jobs: gh api -X POST \ "/repos/${{ github.repository }}/statuses/${{ needs.context.outputs.head-sha }}" \ -f state="$state" \ - -f context='downstream/hpc' \ + -f context='downstream/hpc-atos' \ -f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ -f description="Downstream HPC tests $state$scope"