From 6d5e3c1a1640b525cfeb4150eeb5dad29afdaeca Mon Sep 17 00:00:00 2001 From: Michael Kraus Date: Thu, 8 Oct 2026 20:24:48 +0200 Subject: [PATCH] CI: coverage from Julia 1 on ubuntu, save the cache only from a job that succeeds Copy of the canonical CI.yml. Coverage moves from the min job to the Julia 1 job on ubuntu-latest, because the instrumented job is the slowest and min is the slowest Julia. The cache step of the test matrix takes save-always: false, so a cancelled or failed job does not save a partial cache that the next run restores. The job names and the required checks do not change. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 13 ++++++++++--- CHANGELOG.md | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 75aa9e4..2918b73 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ # # `min` resolves the lower bound of *this* package's `[compat] julia` entry and `1` the current # stable release, so one identical matrix still tests the right versions in a tree whose compat -# floors are 1.10 and 1.11. The check names therefore never change — not when a package raises its +# floors are 1.10, 1.11 and 1.12. The check names therefore never change — not when a package raises its # floor, and not when Julia releases. That is what lets harness ci-protection use one static list. # # `pre` and `nightly` are advisory (`experimental: true` + `continue-on-error`): a failure in an @@ -57,8 +57,10 @@ jobs: env: # Instrument and upload coverage in a single matrix entry only. Uploading from all six # makes Codecov merge six reports of the same scope per run, and the merged percentage - # then moves for reasons that are not code changes. - COVERAGE: ${{ matrix.version == 'min' && matrix.os == 'ubuntu-latest' }} + # then moves for reasons that are not code changes. The entry is `1`, not `min`: + # instrumentation makes the job that carries the coverage the slowest of the matrix, + # and `min` is already the slowest Julia. + COVERAGE: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }} # Two threads, everywhere: a runner has more than one core, and a suite with a threading # test is otherwise silently single-threaded. JULIA_NUM_THREADS: 2 @@ -94,6 +96,11 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 + with: + # Save only from a job that succeeds. A cancelled or failed job saves a partial + # cache, the next run of the branch restores it, and that job then precompiles + # some 300 packages again. + save-always: false - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d86739..9b192ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ first entry is written. ### Changed +- **CI uploads coverage from the `Julia 1 - ubuntu-latest` job** instead of `Julia min`, and a + test job saves the Julia cache only when it succeeds. - **`test/Project.toml` no longer carries a `[compat]` entry for `HDF5`** (`"0.16, 0.17"`). `HDF5` is a dependency of the root `Project.toml`, whose `[compat]` bound governs the test environment too. A test or docs project keeps `[compat]` entries only for its own test-only or