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
13 changes: 10 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<label>" include("<path>")` lines in the groups `core`, `slow` and `metal`, selected by `ARGS`; with no arguments it runs `core` and `slow`, and `metal` too on an Apple-silicon Mac, so `Pkg.test()` and CI run every test they ran before. The 14 nested `test/<subject>/runtests.jl` drivers are gone. A test file sits where the source it tests sits: `test/attention/` and `test/transformers/` went into `test/layers/`, `test/architectures/` and `test/kernels/`; `test/reduced_order_modeling/` into `test/architectures/` and `test/reduced_system/`; `test/losses/training_method_losses.jl` into `test/loss/`; the tests that span the package, the docstring examples among them, into `test/integration/`; and `aqua.jl`, `exports.jl` and `reachability.jl` into `test/quality/`. `test/docstrings/layers_and_architectures.jl`, named in *Added* above, is now `test/integration/docstrings/layers_and_architectures.jl`. `test/layers/sympnet_upscaling.jl` is in `slow`. Thirteen files that drew random numbers without a seed now call `Random.seed!(1234)`. The shared helper of the two gradient-structure tests is `test/helpers/network_parameters_gradient_structure.jl`, and its `@test_broken` names issue #319.
Expand Down
Loading