Split sublibrary CI to only test on dependency changes#3142
Merged
ChrisRackauckas merged 6 commits intoSciML:masterfrom Mar 17, 2026
Merged
Conversation
Move sublibrary functional and QA tests from CI.yml into a new SublibraryCI.yml workflow that only runs tests for sublibraries affected by the changed files. A Python script reads the dependency graph from lib/*/Project.toml, computes transitive reverse dependencies, and outputs the affected sublibraries as a dynamic matrix. Global tests (Interface, Integrators, Regression, etc.) always run in CI.yml regardless of which files changed. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace compute_affected_sublibraries.py with .jl equivalent using stdlib TOML. Add OrdinaryDiffEqCore README to trigger all sublibrary tests on this PR as a verification. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sublibraries can now declare custom test groups (beyond FUNCTIONAL/QA)
by adding a test/test_groups.toml file:
[FUNCTIONAL]
versions = ["lts", "1.11", "1", "pre"]
[QA]
versions = ["1"]
[GPU]
versions = ["1"]
The detection script reads these to build the full matrix of
(group, version) pairs. Default remains FUNCTIONAL + QA when
no test_groups.toml exists.
Also updates runtests.jl to generically detect any _{SUFFIX} group
by checking against actual lib/ directories, replacing the hardcoded
_QA suffix check. This means GROUP="OrdinaryDiffEqFoo_GPU" will
correctly resolve to base_group="OrdinaryDiffEqFoo" with
ODEDIFFEQ_TEST_GROUP="GPU".
The workflow is simplified to a single test job consuming the full
matrix include list from the detection script.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Updated to:
|
Member
|
This is a very nice change. Good idea. |
Member
|
This was needed to complete the StochasticDiffEq and DelayDiffEq stuff haha. |
Rename the default test group from "FUNCTIONAL" to "Core" across all 36 sublibrary runtests.jl files, the top-level runtests.jl, the detection script, and DowngradeSublibraries.yml. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The while loop inside @time's local scope caused idx to be treated as a new local variable, triggering UndefVarError. Replace with a for loop over character indices to avoid the reassignment scoping issue. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GitHub Actions exclude doesn't work with include-only matrices and silently prevents job creation. Move the BDF pre-release exclusion into the Julia script's EXCLUDES set instead. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
CI.ymlinto a newSublibraryCI.ymlworkflow that only runs tests for sublibraries affected by changed files.github/scripts/compute_affected_sublibraries.pywhich reads the dependency graph from alllib/*/Project.tomlfiles (both[deps]and[extras]), computes the transitive reverse-dependency closure, and maps changed file paths to affected sublibrariesCI.ymlHow it works
detect-changesjob runsgit diffand pipes changed files into the Python scriptlib/*/Project.tomlto build the internal dependency graphlib/<pkg>/...file, the script includes that package plus all transitive reverse dependenciesExample behavior
lib/OrdinaryDiffEqCore/src/...lib/OrdinaryDiffEqTsit5/src/...lib/OrdinaryDiffEqFeagin/src/...test/interface/...orsrc/...Benefits
Test plan
detect-changesjob correctly identifies affected sublibraries in CI logstest/orsrc/(non-lib) don't trigger sublibrary tests🤖 Generated with Claude Code