Skip to content

CI updates#1365

Merged
isaacsas merged 10 commits intoSciML:version_16_newfrom
isaacsas:ci_updates
Feb 1, 2026
Merged

CI updates#1365
isaacsas merged 10 commits intoSciML:version_16_newfrom
isaacsas:ci_updates

Conversation

@isaacsas
Copy link
Copy Markdown
Member

@isaacsas isaacsas commented Feb 1, 2026

CI is getting pretty slow these days for two reasons:

  1. Core just has too much, so here I am splitting it into "Models" and "Simulation", which from my review of logs should be roughly the same amount of time.
  2. The approach of instantiating the main Catalyst environment (~16 minutes of compilation) and then later instantiating the extension environment (forcing recompilation and another ~20+ minutes) is really slow. Splitting the extension tests to their own CI action should allow us to precompile the full extension environment for those tests, cutting this time in half.

isaacsas and others added 3 commits January 31, 2026 23:36
…llelization

The Core test group (~42 min) is split into:
- Modeling (~20 min): ReactionSystem structure, DSL, compositional modeling, network analysis
- Simulation (~23 min): ODE/SDE/Jump simulations, solving, MTK problem integration

This increases CI jobs from 15 to 18 (3 Julia versions × 6 groups).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove Extensions from Test.yml matrix to avoid cache race condition
- Create TestExtensions.yml with pre-instantiation step that:
  - Instantiates and precompiles test/extensions environment before tests
  - Gets its own cache scope (separate workflow = separate cache)

This should reduce Extensions test time from ~60 min to ~15-20 min on
warm cache runs, as heavy dependencies (CairoMakie, HomotopyContinuation,
StructuralIdentifiability) will be cached with their compiled artifacts.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Packages compiled without --code-coverage need to be recompiled when
run with coverage instrumentation. Add --code-coverage=user to the
precompile step so packages are compiled for the same configuration
used during tests.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@TorkelE
Copy link
Copy Markdown
Member

TorkelE commented Feb 1, 2026

Not sure I fully understand 2. You mean taht we can do them in parallel? Making things faster sounds all good to me.

isaacsas and others added 7 commits February 1, 2026 09:03
Change from --code-coverage=user to --code-coverage=@$(pwd) to match
the exact format julia-runtest uses. This should allow precompiled
packages to be reused during test execution.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
ModelingToolkit is not MIT licensed (as of v11) and should not be used.
The extension tests don't directly use ModelingToolkit/ModelingToolkitBase -
they get needed functionality transitively through Catalyst.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use matching compilation flags (--code-coverage=user, --check-bounds=yes,
--compiled-modules=yes, --inline=yes) between pre-instantiate and test
execution steps. This ensures precompilation cache can be reused.

Also creates dedicated runtests_extensions.jl that can be run directly
by the workflow or included from runtests.jl for local testing.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
These packages are needed for runtests_extensions.jl to run
directly with --project=test/extensions.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use @__DIR__ directly in each @safetestset block since the macro
runs code in a separate module where outer constants are not visible.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add Logging, OrdinaryDiffEqVerner, SparseArrays, and StableRNGs which
are required by the extension test files when running directly.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@isaacsas
Copy link
Copy Markdown
Member Author

isaacsas commented Feb 1, 2026

The extensions tests previously had a workflow where we

  1. Activated and installed the Catalyst dependencies.
  2. After non-extension tests pass we activate a new environment for the extensions tests and run them.

This resulted in double compilation in many cases (i.e. the activation of the extension environment caused invalidation of packages installed from the Catalyst environment, so they were then recompiled I believe). Hence we had 40+ minute of stuff compiling before the extension tests even started running.

WIth this split that should be avoided, halving the compilation time. And now the extension tests should also cache their compiled libraries (so if you make updates to a PR, hopefully there is no recompilation except of the extension itself).

@isaacsas
Copy link
Copy Markdown
Member Author

isaacsas commented Feb 1, 2026

The main change here is if we add new extension test files they need to be put in the runtests_extensions.jl file. Calling Pkg.test() locally will work just like before; it is only in CI that there are any changes.

@isaacsas isaacsas merged commit 36b4dc7 into SciML:version_16_new Feb 1, 2026
17 of 19 checks passed
@isaacsas isaacsas deleted the ci_updates branch February 1, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants