From b78300e3d52cd814ceab3b10098f0847a9a628a8 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Thu, 30 Apr 2026 21:59:04 +0200 Subject: [PATCH 1/9] Enable ci on all branches and staged pull requests --- .github/workflows/cibuildwheel.yml | 17 ++++++++++++++--- .github/workflows/tox.yml | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index fc086f5..4d86a46 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -1,11 +1,18 @@ name: Build and deploy wheel on: + # Trigger the workflow on all pushes, except on tag creation push: - branches: [ master ] - pull_request: - branches: [ master ] + branches: + - '**' + tags-ignore: + - '**' + # Trigger the workflow on all pull requests + pull_request: ~ + + # Allow workflow to be dispatched on demand + workflow_dispatch: ~ jobs: build_wheels: name: Build wheels on ${{ matrix.os }} for ${{ matrix.python }} @@ -67,6 +74,10 @@ jobs: name: Upload wheels to TestPyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest + + # Only run for pushes to master (not PRs, not workflow_dispatch) + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + steps: - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 487e2f0..e12b55d 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -1,10 +1,19 @@ name: Tox tests on: + + # Trigger the workflow on all pushes, except on tag creation push: - branches: [ master ] - pull_request: - branches: [ master ] + branches: + - '**' + tags-ignore: + - '**' + + # Trigger the workflow on all pull requests + pull_request: ~ + + # Allow workflow to be dispatched on demand + workflow_dispatch: ~ jobs: build: From 5579d6ccfe950e6ffa8701a696b397b2def1cb8c Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Thu, 30 Apr 2026 22:00:00 +0200 Subject: [PATCH 2/9] Fix broken editable builds for easy development Now `pip install -e .` will work correctly: -`import atlas4py` will then trigger a build/install step if needed. - The __init__.py used is located in the source-dir --- pyproject.toml | 12 ++++++++++-- src/atlas4py/CMakeLists.txt | 4 ---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bdceca7..0703d4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,8 +53,16 @@ cmake.args = [ ] wheel.expand-macos-universal-tags = true wheel.install-dir = "atlas4py" -wheel.packages = [] -wheel.license-files = [] +wheel.packages = ["src/atlas4py"] +wheel.exclude = ["**/CMakeLists.txt", "**/*.cmake", "**/*.cpp", "**/*.hpp"] +wheel.license-files = ["LICENSE"] + +editable.rebuild = true # automatically recompile/install if needed +editable.verbose = true # verbose output + +[[tool.scikit-build.overrides]] +if.state = "editable" +cmake.build-type = "Debug" [tool.black] line-length = 99 diff --git a/src/atlas4py/CMakeLists.txt b/src/atlas4py/CMakeLists.txt index 10d5df8..6f0457e 100644 --- a/src/atlas4py/CMakeLists.txt +++ b/src/atlas4py/CMakeLists.txt @@ -81,7 +81,3 @@ target_compile_definitions(_atlas4py PRIVATE ATLAS4PY_VERSION_STRING=${PROJECT_V ### Installation install(TARGETS _atlas4py DESTINATION .) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ - DESTINATION . - FILES_MATCHING PATTERN "*.py" -) From d3ad4631139ac1bf5e66e08985f7af0c258a5e17 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Mon, 4 May 2026 15:00:50 +0200 Subject: [PATCH 3/9] Add Github Actions tests for editable installations --- .github/actions/setup-build-env/action.yml | 66 +++++++ .../verify-atlas4py-rebuild/action.yml | 39 ++++ .github/actions/verify-atlas4py/action.yml | 27 +++ .github/workflows/editable-install.yml | 173 ++++++++++++++++++ 4 files changed, 305 insertions(+) create mode 100644 .github/actions/setup-build-env/action.yml create mode 100644 .github/actions/verify-atlas4py-rebuild/action.yml create mode 100644 .github/actions/verify-atlas4py/action.yml create mode 100644 .github/workflows/editable-install.yml diff --git a/.github/actions/setup-build-env/action.yml b/.github/actions/setup-build-env/action.yml new file mode 100644 index 0000000..9f8bb92 --- /dev/null +++ b/.github/actions/setup-build-env/action.yml @@ -0,0 +1,66 @@ +name: Setup atlas4py build environment +description: Install system + Python build dependencies for atlas4py on Linux/macOS. + +inputs: + python-version: + description: Python version to set up + required: true + install-build-backend: + description: > + Whether to pre-install pybind11, scikit-build-core and numpy into the + host environment. Required for `--no-build-isolation` builds; can be + skipped when pip provisions an isolated build environment. + required: false + default: 'false' + +outputs: + sys-deps-cache-key: + description: >- + A string encoding the versions of installed system libraries (e.g. MPI). + Include this in cache keys that depend on compiled system dependencies. + value: ${{ steps.sys-deps-key.outputs.value }} + +runs: + using: composite + steps: + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Install system build dependencies (Linux) + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + build-essential cmake ninja-build libopenmpi-dev openmpi-bin libomp-dev + + - name: Install system build dependencies (macOS) + if: runner.os == 'macOS' + shell: bash + run: | + brew update + brew install cmake ninja open-mpi + + - name: Collect system library versions for cache key + id: sys-deps-key + shell: bash + run: | + if [ "$RUNNER_OS" = "Linux" ]; then + MPI_VERSION=$(dpkg-query --showformat='${Version}' --show libopenmpi-dev) + OMP_VERSION=$(dpkg-query --showformat='${Version}' --show libomp-dev) + echo "value=mpi-${MPI_VERSION}-omp-${OMP_VERSION}" >> "$GITHUB_OUTPUT" + else + MPI_VERSION=$(brew list --versions open-mpi | awk '{print $2}') + echo "value=mpi-${MPI_VERSION}" >> "$GITHUB_OUTPUT" + fi + + - name: Upgrade pip + shell: bash + run: python -m pip install --upgrade pip + + - name: Install Python build backend (for --no-build-isolation builds) + if: inputs.install-build-backend == 'true' + shell: bash + run: python -m pip install pybind11 scikit-build-core numpy diff --git a/.github/actions/verify-atlas4py-rebuild/action.yml b/.github/actions/verify-atlas4py-rebuild/action.yml new file mode 100644 index 0000000..a16d356 --- /dev/null +++ b/.github/actions/verify-atlas4py-rebuild/action.yml @@ -0,0 +1,39 @@ +name: Verify atlas4py editable rebuild +description: > + Verify that an editable install of atlas4py picks up edits to both Python + and C++ sources (i.e. that scikit-build-core's editable.rebuild works). + +runs: + using: composite + steps: + - name: Verify editable Python edits are picked up + shell: bash + run: | + python - <<'PY' + import pathlib + path = pathlib.Path("src/atlas4py/__init__.py") + marker = "\n__CI_EDITABLE_MARKER__ = 'changed'\n" + txt = path.read_text(encoding="utf-8") + if marker not in txt: + path.write_text(txt + marker, encoding="utf-8") + import atlas4py + assert getattr(atlas4py, "__CI_EDITABLE_MARKER__", None) == "changed" + print("Editable Python change reflected OK") + PY + + - name: Verify editable C++ edits trigger a rebuild + shell: bash + run: | + sed -i.bak 's/ATLAS4PY_VERSION_STRING/__CI_EDITABLE_MARKER__/g' \ + src/atlas4py/_atlas4py.cpp && rm -f src/atlas4py/_atlas4py.cpp.bak + python - <<'PY' + import atlas4py + assert atlas4py.__version__ == "__CI_EDITABLE_MARKER__", atlas4py.__version__ + print("Editable C++ change reflected OK") + PY + + - name: Restore edited sources + if: always() + shell: bash + run: | + git checkout -- src/atlas4py/__init__.py src/atlas4py/_atlas4py.cpp || true diff --git a/.github/actions/verify-atlas4py/action.yml b/.github/actions/verify-atlas4py/action.yml new file mode 100644 index 0000000..642bcf8 --- /dev/null +++ b/.github/actions/verify-atlas4py/action.yml @@ -0,0 +1,27 @@ +name: Verify atlas4py installation +description: Common smoke tests run after an atlas4py install (import, version, pytest). + +runs: + using: composite + steps: + - name: Verify import + shell: bash + env: + ATLAS_DEBUG: "1" + run: python -c "import atlas4py; print('atlas4py', atlas4py.__version__, 'imported successfully')" + + - name: Verify version matches pyproject.toml + shell: bash + run: | + python - <<'PY' + import tomllib, pathlib, atlas4py + expected = tomllib.loads(pathlib.Path("pyproject.toml").read_text())["project"]["version"] + assert atlas4py.__version__ == expected, (atlas4py.__version__, expected) + print("Version OK:", expected) + PY + + - name: Run pytest suite + shell: bash + run: | + python -m pip install pytest + pytest -v tests diff --git a/.github/workflows/editable-install.yml b/.github/workflows/editable-install.yml new file mode 100644 index 0000000..e2c50af --- /dev/null +++ b/.github/workflows/editable-install.yml @@ -0,0 +1,173 @@ +name: Editable install tests + +on: + push: + branches: + - '**' + tags-ignore: + - '**' + pull_request: ~ + workflow_dispatch: ~ + +jobs: + # --------------------------------------------------------------------------- + # Editable install using the bundled (FetchContent) eckit + atlas dependencies + # --------------------------------------------------------------------------- + editable-internal: + name: Editable (bundled) - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + python-version: ["3.13"] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup build environment + uses: ./.github/actions/setup-build-env + with: + python-version: ${{ matrix.python-version }} + # Pre-install build backend only when we will skip pip's build isolation. + install-build-backend: 'true' + + - name: Editable install + run: | + export CMAKE_ARGS="-DATLAS_ENABLE_OMP=ON" + python -m pip install --no-build-isolation -v -e . + + # ----- Verification -------------------------------------------------- + - name: Verify atlas4py installation + uses: ./.github/actions/verify-atlas4py + + # ----- Editable-rebuild specific checks ------------------------------ + - name: Verify atlas4py editable rebuild + uses: ./.github/actions/verify-atlas4py-rebuild + + # --------------------------------------------------------------------------- + # Editable install using externally built eckit + atlas + # --------------------------------------------------------------------------- + editable-external: + name: Editable (external) - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + python-version: ["3.13"] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup build environment + uses: ./.github/actions/setup-build-env + id: build-env + with: + python-version: ${{ matrix.python-version }} + install-build-backend: 'true' + + - name: Extract pinned dependency versions from pyproject.toml + id: versions + run: | + python - <<'PY' >> "$GITHUB_ENV" + import pathlib, re, tomllib + cfg = tomllib.loads(pathlib.Path("pyproject.toml").read_text()) + args = cfg["tool"]["scikit-build"]["cmake"]["args"] + pat = re.compile(r"^-D(ATLAS4PY_[A-Za-z0-9_]+)=(.*)$") + for a in args: + m = pat.match(a) + if m: + print(f"{m.group(1)}={m.group(2)}") + PY + + - name: Cache external eckit + atlas install + id: cache-deps + uses: actions/cache@v4 + with: + path: deps/install + key: ext-deps-atlas-${{ env.ATLAS4PY_ATLAS_VERSION }}-eckit-${{ env.ATLAS4PY_ECKIT_VERSION }}-ecbuild-${{ env.ATLAS4PY_ECBUILD_VERSION }}-${{ runner.os }}[${{ steps.build-env.outputs.sys-deps-cache-key }}] + + - name: Build external eckit + atlas + if: steps.cache-deps.outputs.cache-hit != 'true' + run: | + mkdir -p deps/source + pushd deps + + echo "::group::Clone ecbuild ${ATLAS4PY_ECBUILD_VERSION}" + git clone --branch ${ATLAS4PY_ECBUILD_VERSION} --single-branch https://github.com/ecmwf/ecbuild source/ecbuild + echo "::endgroup::" + + echo "::group::Clone eckit ${ATLAS4PY_ECKIT_VERSION}" + git clone --branch ${ATLAS4PY_ECKIT_VERSION} --single-branch https://github.com/ecmwf/eckit source/eckit + echo "::endgroup::" + + echo "::group::Clone atlas ${ATLAS4PY_ATLAS_VERSION}" + git clone --branch ${ATLAS4PY_ATLAS_VERSION} --single-branch https://github.com/ecmwf/atlas source/atlas + echo "::endgroup::" + + export CMAKE_PREFIX_PATH=$PWD/install + + echo "::group::Configure eckit" + cmake -S source/eckit -B build/eckit -G Ninja \ + -DENABLE_TESTS=OFF -DENABLE_FORTRAN=OFF -DCMAKE_BUILD_TYPE=Release + echo "::endgroup::" + + echo "::group::Build eckit" + cmake --build build/eckit --parallel + echo "::endgroup::" + + echo "::group::Install eckit" + cmake --install build/eckit --prefix install/eckit + echo "::endgroup::" + + echo "::group::Configure atlas" + cmake -S source/atlas -B build/atlas -G Ninja \ + -DENABLE_TESTS=OFF -DENABLE_FORTRAN=OFF -DCMAKE_BUILD_TYPE=Release + echo "::endgroup::" + + echo "::group::Build atlas" + cmake --build build/atlas --parallel + echo "::endgroup::" + + echo "::group::Install atlas" + cmake --install build/atlas --prefix install/atlas + echo "::endgroup::" + + popd + + - name: Editable install against external deps + run: | + export CMAKE_PREFIX_PATH=$PWD/deps/install + python -m pip install --no-build-isolation -v -e . + + # ----- Verification -------------------------------------------------- + - name: Verify atlas4py installation + uses: ./.github/actions/verify-atlas4py + + # ----- External-deps specific check ---------------------------------- + - name: Verify atlas4py was linked against the external atlas + run: | + python - <<'PY' + import pathlib, platform, subprocess, atlas4py._atlas4py as _ext + ext = pathlib.Path(_ext.__file__).resolve() + print(ext) + if platform.system() == "Darwin": + # `otool -l` dumps load commands, including LC_RPATH entries which + # carry the absolute external install path baked in at link time. + out = subprocess.check_output(["otool", "-l", str(ext)]).decode() + else: + out = subprocess.check_output(["ldd", str(ext)]).decode() + print(out) + assert "libatlas" in out, "libatlas not linked" + # Must resolve to our externally-installed atlas + external = str(pathlib.Path("deps/install/atlas").resolve()) + assert external in out, f"expected external atlas path {external} in linker output" + print("External atlas linkage OK") + PY + + # ----- Editable-rebuild specific checks ------------------------------ + - name: Verify atlas4py editable rebuild + uses: ./.github/actions/verify-atlas4py-rebuild From a5fe948644553ba87a05efec61d1adb980bb842e Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Mon, 4 May 2026 14:59:19 +0200 Subject: [PATCH 4/9] Remove unused packages: setuptools, wheel, packaging, pytest-cache --- .github/workflows/tox.yml | 2 +- pyproject.toml | 6 ++---- requirements-dev.txt | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index e12b55d..1262341 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -30,7 +30,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install python dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade pip - name: Test with tox run: | pyversion_no_dot="${{ matrix.python-version }}" diff --git a/pyproject.toml b/pyproject.toml index 0703d4f..be9f89a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,14 +2,12 @@ build-backend = 'scikit_build_core.build' requires = [ 'scikit-build-core>=0.10.7', - 'wheel>=0.45.1', 'pybind11>=2.11.1', ] [project] dependencies = [ - 'numpy>=1.23', - 'packaging>=20.0' + 'numpy>=1.23' ] description = 'Python bindings for Atlas: a ECMWF library for parallel data-structures' @@ -37,7 +35,7 @@ classifiers = [ repository = 'https://github.com/GridTools/atlas4py' [project.optional-dependencies] -test = ['pytest', 'pytest-cache'] +test = ['pytest'] [tool.scikit-build] minimum-version = '0.5' diff --git a/requirements-dev.txt b/requirements-dev.txt index 43cad8c..e94e170 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,5 +3,4 @@ bump-my-version>=1.2.6 numpy>=1.17 pytest>=6.1 tox>=4.0 -setuptools>=69 build>=1.2.2 From 7e3e7a1a408dee6fcbd0fa908a7d9b86bdaecde3 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Mon, 4 May 2026 15:47:40 +0200 Subject: [PATCH 5/9] Version 0.41.1.dev3 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index be9f89a..eb555b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ description = 'Python bindings for Atlas: a ECMWF library for parallel data-structures' name = 'atlas4py' -version = '0.41.1.dev2' # ...dev : ...dev +version = '0.41.1.dev3' # ...dev : ...dev license = {text = "Apache License 2.0"} readme = {file = 'README.md', content-type = 'text/markdown'} authors = [{email = 'willem.deconinck@ecmwf.int'}, {name = 'Willem Deconinck'}] From b29508b79ba421ff0e0dbc0a54b2d9131a60f8d0 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Mon, 4 May 2026 16:09:38 +0200 Subject: [PATCH 6/9] Update github action versions avoiding the deprecated node20 runtime --- .github/actions/setup-build-env/action.yml | 2 +- .github/workflows/cibuildwheel.yml | 10 +++++----- .github/workflows/editable-install.yml | 6 +++--- .github/workflows/tox.yml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-build-env/action.yml b/.github/actions/setup-build-env/action.yml index 9f8bb92..9efd411 100644 --- a/.github/actions/setup-build-env/action.yml +++ b/.github/actions/setup-build-env/action.yml @@ -24,7 +24,7 @@ runs: using: composite steps: - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 4d86a46..70ce28e 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -48,7 +48,7 @@ jobs: CIBW_TEST_REQUIRES: -r requirements-dev.txt CIBW_TEST_COMMAND: pytest -v {project}/tests - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: wheel-${{matrix.python}}-${{ matrix.os }} path: ./dist/*.whl @@ -58,14 +58,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Python - uses: actions/setup-python@v2 - - uses: actions/checkout@v4 + uses: actions/setup-python@v6 + - uses: actions/checkout@v6 - name: Install requirements run: python -m pip install -r requirements-dev.txt - name: Make sdist run: python -m build --sdist --outdir dist/ - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: sdist path: ./dist/*.tar.gz @@ -79,7 +79,7 @@ jobs: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: path: dist merge-multiple: true diff --git a/.github/workflows/editable-install.yml b/.github/workflows/editable-install.yml index e2c50af..38072c2 100644 --- a/.github/workflows/editable-install.yml +++ b/.github/workflows/editable-install.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup build environment uses: ./.github/actions/setup-build-env @@ -60,7 +60,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup build environment uses: ./.github/actions/setup-build-env @@ -85,7 +85,7 @@ jobs: - name: Cache external eckit + atlas install id: cache-deps - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: deps/install key: ext-deps-atlas-${{ env.ATLAS4PY_ATLAS_VERSION }}-eckit-${{ env.ATLAS4PY_ECKIT_VERSION }}-ecbuild-${{ env.ATLAS4PY_ECBUILD_VERSION }}-${{ runner.os }}[${{ steps.build-env.outputs.sys-deps-cache-key }}] diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 1262341..0b4a484 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -23,9 +23,9 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install python dependencies From 94be3a236b79d508d3755838ac2e560781ad8dd7 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Mon, 4 May 2026 17:20:58 +0200 Subject: [PATCH 7/9] Avoid duplicate runs in pull requests --- .github/workflows/cibuildwheel.yml | 8 ++++++++ .github/workflows/editable-install.yml | 2 ++ .github/workflows/tox.yml | 1 + 3 files changed, 11 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 70ce28e..7d7db2a 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -14,9 +14,16 @@ on: # Allow workflow to be dispatched on demand workflow_dispatch: ~ jobs: + pre-check: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + runs-on: ubuntu-latest + steps: + - run: echo "Condition met, proceeding with workflow." + build_wheels: name: Build wheels on ${{ matrix.os }} for ${{ matrix.python }} runs-on: ${{ matrix.os }} + needs: pre-check # This job won't start if 'pre-check' is skipped strategy: matrix: os: @@ -56,6 +63,7 @@ jobs: build_sdist: name: Build sdist runs-on: ubuntu-latest + needs: pre-check # This job won't start if 'pre-check' is skipped steps: - name: Set up Python uses: actions/setup-python@v6 diff --git a/.github/workflows/editable-install.yml b/.github/workflows/editable-install.yml index 38072c2..ab1a372 100644 --- a/.github/workflows/editable-install.yml +++ b/.github/workflows/editable-install.yml @@ -14,6 +14,7 @@ jobs: # Editable install using the bundled (FetchContent) eckit + atlas dependencies # --------------------------------------------------------------------------- editable-internal: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Editable (bundled) - ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -50,6 +51,7 @@ jobs: # Editable install using externally built eckit + atlas # --------------------------------------------------------------------------- editable-external: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Editable (external) - ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 0b4a484..53b782e 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -18,6 +18,7 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] From 0e60d382b5ceed7c50e8fc2f9594a5bdf2e98126 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Mon, 4 May 2026 17:38:07 +0200 Subject: [PATCH 8/9] Avoid warning on missing python-version in build_sdist --- .github/workflows/cibuildwheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 7d7db2a..349782f 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -67,6 +67,8 @@ jobs: steps: - name: Set up Python uses: actions/setup-python@v6 + with: + python-version: '3.13' - uses: actions/checkout@v6 - name: Install requirements run: python -m pip install -r requirements-dev.txt From 8eb6b597bc8a397571da2b5202e87b820c71400c Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Tue, 5 May 2026 11:40:50 +0200 Subject: [PATCH 9/9] Remove installation of ninja and cmake as they are already present on runners --- .github/actions/setup-build-env/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-build-env/action.yml b/.github/actions/setup-build-env/action.yml index 9efd411..7b5f533 100644 --- a/.github/actions/setup-build-env/action.yml +++ b/.github/actions/setup-build-env/action.yml @@ -34,14 +34,14 @@ runs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends \ - build-essential cmake ninja-build libopenmpi-dev openmpi-bin libomp-dev + build-essential libopenmpi-dev openmpi-bin libomp-dev - name: Install system build dependencies (macOS) if: runner.os == 'macOS' shell: bash run: | brew update - brew install cmake ninja open-mpi + brew install open-mpi - name: Collect system library versions for cache key id: sys-deps-key