diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 75aa9e46a..2918b7341 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 7a84549a8..85ec66ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ breaking release). ### 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.** - **The package needs Julia 1.12 or later** (`[compat] julia = "1.12"`, was `"1.11"`). On Julia 1.11.9, the gradient of an `LNNLoss` with respect to the network parameters stops with `StackOverflowError` in type inference ("Internal error: during type inference of … Encountered stack overflow") on macOS and Windows; the `Julia min` job on Linux passes. The overflow comes from SymbolicUtils 4.49.0, whose `rrule` for `SymbolicUtils.Code.create_array` returns an exactly typed tuple of tangents, one per array element; Zygote's reverse pass through the generated Hessian of `lagrangian_acceleration` is then inferred far deeper. With the 4.48.0 rule restored, or in a task with a 64 MB stack, the same gradient passes on 1.11.9; Julia 1.12.7 and 1.13.1 pass it on the root task. This closes #327: the `Julia min` jobs on macOS and Windows had failed in the *Lagrangian Neural Network* testset since 2026-10-01, and every testset after it was never run there. - **`test/Project.toml` has no `[compat]` entry for a dependency of the package.** The entries for AbstractNeuralNetworks, GeometricOptimizers, HDF5, KernelAbstractions, LinearAlgebra, NeuralNetworkParameters, Random and Zygote are gone: the test environment contains the package, so the bounds of `Project.toml` apply there, and an entry in `test/Project.toml` can only repeat or narrow them. `NeuralNetworkParameters = "0.3"` was narrower than the package's `"0.3, 0.4"`. - **The test suite follows one flat layout.** `test/runtests.jl` is one list of `@safetestset "