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
54 changes: 54 additions & 0 deletions .ci/manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[package]
name = "pyodc"
repo = "ecmwf/pyodc"
visibility = "public"
fork-pull-requests = false
allow-stale-deps = true
compiler-inputs = []
ci-pre-commit = false
ci-schedule = "from-dependencies+21"
full-history = true

[[deps]]
repo = "ecmwf/odc"
package = "odc"
ref = "develop"
compiler-inputs = ["cxx-compiler"]

# A pure-Python upstream, built on the GitHub runner rather than in this container.
[[deps]]
repo = "ecmwf/findlibs"
package = "findlibs"
ref = "develop"
compiler-inputs = []
python-version-input = "python-version"
platform-input = "python-platform"
build-type-input = "python-build-type"

[[trigger-downstream]]
repo = "ecmwf/earthkit-data"
ref = "develop"

[matrix.test]
triggers = ["upstream-change", "rebuild-request"]

# The container and compiler of odc's build, whose library the tests load.
[matrix.test.defaults]
job-script = "./.ci/test.sh.j2"
runs-on = "ubuntu-latest"
container = "eccr.ecmwf.int/public-ci-images/ubuntu24.04-gcc13-gfortran13"
platform = "ubuntu-24.04"
cxx-compiler = "g++-13"
c-compiler = "gcc-13"
build-type = "RelWithDebInfo"
python-platform = "gh-ubuntu-26.04"
python-build-type = "Release"

[[matrix.test.include]]
python-version = "3.11"

[[matrix.test.include]]
python-version = "3.12"

[[matrix.test.include]]
python-version = "3.13"
5 changes: 5 additions & 0 deletions .ci/test.sh.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "ci-infrastructure/python-runner.sh.j2" %}
{% block set_environment %}
export FINDLIBS_DISABLE_PACKAGE=yes
{% endblock %}
{% block test_requirements %}-r "$CI_SOURCE_DIR/requirements.txt"{% endblock %}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.github/workflows/ @iainrussell @mcocdawc
/.ci/ @iainrussell @mcocdawc
160 changes: 134 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,141 @@
name: ci
# GENERATED FILE - DO NOT EDIT.
# Regenerate via the ci-infrastructure-generate CLI.
# Source of truth: each repo's .ci/manifest.toml.
name: CI

on:
# Trigger the workflow on push to master or develop, except tag creation
push:
branches:
- 'master'
- 'develop'
tags-ignore:
- '**'
branches: [develop, master, main]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
schedule:
- cron: "58 3 * * *"

# Trigger the workflow on pull request
pull_request: ~
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

# Trigger the workflow manually
workflow_dispatch: ~
permissions:
contents: read

env:
ARTIFACT_POLL_INTERVAL: ${{ vars.ARTIFACT_POLL_INTERVAL || '60' }}
ARTIFACT_WAIT_TIMEOUT: ${{ vars.ARTIFACT_WAIT_TIMEOUT || '1800' }}
ARTIFACT_S3_ENDPOINT: ${{ secrets.ARTIFACT_S3_ENDPOINT }}
ARTIFACT_S3_BUCKET: ${{ secrets.ARTIFACT_S3_BUCKET }}
SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

jobs:
# Run CI including downstream packages on self-hosted runners
downstream-ci:
name: downstream-ci
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main
with:
pyodc: ecmwf/pyodc@${{ github.event.pull_request.head.sha || github.sha }}
secrets: inherit

# Build downstream packages on HPC
downstream-ci-hpc:
name: downstream-ci-hpc
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
with:
pyodc: ecmwf/pyodc@${{ github.event.pull_request.head.sha || github.sha }}
secrets: inherit
ci-approval:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: ecmwf/ci-infrastructure/actions/require-ci-approval@main

resolve:
needs: ci-approval
runs-on: ubuntu-latest
outputs:
matrices: ${{ steps.r.outputs.json }}
dispatch-plans: ${{ steps.r.outputs.dispatch-plans }}
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,eckit,findlibs,odc,pyodc,stack-dependencies
permissions: contents:read actions:read
- uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
- id: r
uses: ecmwf/ci-infrastructure/actions/resolve-deps@main
with:
matrix: test
token: ${{ steps.mint.outputs.token }}
rebuild-missing: 'true'
- name: Wait for the deps of test
if: steps.r.outputs.dispatch-plans == '[]'
uses: ecmwf/ci-infrastructure/actions/wait-for-deps@main
with:
matrix: ${{ steps.r.outputs.json }}
kinds: test
token: ${{ steps.mint.outputs.token }}
name: resolve + wait-build

rebuild-producers:
needs: [ci-approval, resolve]
runs-on: ubuntu-latest
steps:
- if: needs.resolve.outputs.dispatch-plans != '' && needs.resolve.outputs.dispatch-plans != '[]'
uses: ecmwf/ci-infrastructure/actions/dispatch-producers@main
with:
dispatch-plans: ${{ needs.resolve.outputs.dispatch-plans }}
repositories: ecbuild,eckit,findlibs,odc,pyodc,stack-dependencies
client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }}
app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }}

test:
needs: [ci-approval, resolve, rebuild-producers]
name: test (${{ matrix._resolved['job-name'] }})
runs-on: ${{ matrix['runs-on'] }}
container:
image: ${{ matrix.container || '' }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.resolve.outputs.matrices).test }}
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,eckit,findlibs,odc,pyodc,stack-dependencies
permissions: contents:read actions:read
- uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
- 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 }}
- name: Print dependency table
uses: ecmwf/ci-infrastructure/actions/print-dep-table@main
with:
resolved: ${{ toJSON(matrix._resolved) }}
- name: Build
id: build
uses: ecmwf/ci-infrastructure/actions/run-job-script@main
with:
job-script: ${{ matrix.job-script }}
matrix-leg: ${{ toJSON(matrix) }}
package: pyodc
cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }}
- name: Publish
uses: ecmwf/ci-infrastructure/actions/publish-artifact@main
with:
install-path: ${{ steps.build.outputs.install-path }}
artifact-name: ${{ matrix._resolved['own-artifact-name'] }}

ci-result:
name: collect results
if: always()
needs: [ci-approval, resolve, test]
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: ecmwf/ci-infrastructure/actions/ci-result@main
with:
needs: ${{ toJSON(needs) }}
10 changes: 0 additions & 10 deletions .github/workflows/label-public-pr.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/old_CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: old CI

on:
# Trigger the workflow after the new CI succeeded on a push
workflow_run:
workflows: [CI]
types: [completed]
branches:
- "master"
- "develop"

# Trigger the workflow manually
workflow_dispatch: ~

jobs:
# Run CI including downstream packages on self-hosted runners
downstream-ci:
name: downstream-ci
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success') }}
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main
with:
ci_group: only-self
pyodc: ecmwf/pyodc@${{ github.event.workflow_run.head_sha || github.sha }}
secrets: inherit

# Build downstream packages on HPC
downstream-ci-hpc:
name: downstream-ci-hpc
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success') }}
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
with:
ci_group: only-self
pyodc: ecmwf/pyodc@${{ github.event.workflow_run.head_sha || github.sha }}
secrets: inherit
Loading