Feat/docker ci - #36
Merged
Merged
Conversation
Pre-bakes Rust 1.94.0 + clippy/rustfmt + wasm-pack 0.14.0 + uv on Ubuntu 24.04. Python and Node.js are installed at CI runtime to keep the image at 1.55 GB. - Multi-stage build: wasm-pack compiled in builder, only binary copied - libclang1-18 instead of libclang-18-dev (saves ~250 MB) - Static .a libs stripped, shared libs stripped of debug symbols - All tool versions pinned as ARGs at the top for easy bumps - VERSION file for semver tagging (1.0.0)
Triggers on pushes to main touching .github/ci/** and on PRs (build-only, no push). Publishes four tags per build: :1.0.0, :1.0, :1, :latest. Uses docker/build-push-action with GHA cache.
Split matrix jobs into Linux (container) + macOS (bare metal). 5 Linux jobs now run inside eccr.ecmwf.int/tensogram/ci:1.0.0, eliminating LLVM, cmake, apt-get, rust-toolchain, setup-uv, setup-node, and wasm-pack installation steps. - Python installed at runtime via uv python install (~10s) - Node.js downloaded at runtime for WASM job (~3s) - Swatinem/rust-cache removed (incompatible with self-hosted runners) - Cleanup steps kept on all jobs (root-owned files on self-hosted) - permissions: contents: read for least privilege - python-free-threaded/python-packages now gate on main-linux only
…lity Split main-linux into 3 parallel container jobs: - lint: fmt + focused clippy (no wasted test-mode compilation) - test: all cargo test runs in optimal artifact-reuse order - python: bindings build + pytest (separate build world) Also fixes: - 'source' -> '.' for POSIX sh compatibility in containers - Over-broad '--all-features' clippy replaced with targeted feature checks per crate (avoids needless feature unification)
Remove libnetcdf-dev, libhdf5-dev, libeccodes-dev from the Docker image since GRIB/NetCDF are already tested on macOS. Merges python-free-threaded and python-packages into the test job to reuse compiled artifacts. Bumps image to 1.1.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces per-job tool installation (LLVM, cmake, apt-get, rust-toolchain, setup-uv, setup-node, wasm-pack) with a single pre-baked Docker image. macOS jobs are unchanged.
Image (
eccr.ecmwf.int/tensogram/ci)ARGs at the top of the Dockerfile.github/ci/VERSION→ tags:1.0.0,:1.0,:1,:latestCI restructuring
main(matrix: Linux + macOS)main-linux(container) +main-macos(bare metal)cpp(matrix: Linux + macOS)cpp-linux(container) +cpp-macos(bare metal)python-free-threaded(Linux, installs LLVM/cmake/uv)python-free-threaded(container, zero setup)python-packages(Linux, installs LLVM/cmake/uv)python-packages(container, zero setup)wasm(Linux, installs rust-toolchain/node/wasm-pack)wasm(container, only downloads node binary)Eliminated from every Linux job:
KyleMayes/install-llvm-action,dtolnay/rust-toolchain,astral-sh/setup-uv,actions/setup-node,apt-get install, cmake pip fallback,cargo install wasm-pack,has_grib_depsconditional.Other changes:
Swatinem/rust-cacheremoved from all jobs (doesn't work reliably on self-hosted runners)python-free-threadedandpython-packagesnow gate onmain-linuxonly (not macOS) — they start soonerpermissions: contents: readadded for least privilegeworkflow_dispatchadded to CI for manual re-runs (needed for bootstrap)if: always()) for root-owned files on self-hosted runnersNew files
.github/ci/Dockerfile.github/ci/VERSION.github/workflows/ci-image.ymlLocally verified inside the container
cargo fmt+clippy+test --workspaceContributor Declaration
By opening this pull request, I affirm the following:
Docs Preview
https://sites.ecmwf.int/docs/dev-section/tensogram/pull-requests/PR-36