From 103e9c8e7df92e59d8f601949cd6b52b21998cd0 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 9 Jun 2026 17:58:53 -0400 Subject: [PATCH 1/4] Canonical CI: grouped-tests.yml + root test/test_groups.toml Convert the root Tests.yml from a hand-maintained version x os matrix calling tests.yml@v1 into a thin caller of the canonical grouped-tests.yml@v1, with the matrix declared once in test/test_groups.toml. - Tests.yml: replace the matrix test job with the thin grouped-tests.yml@v1 caller (secrets: inherit); on:/concurrency: preserved verbatim. No `with:` needed -- all defaults match the prior setup (GROUP env name, check-bounds=yes, coverage on, src,ext). - test/test_groups.toml: [Core] on [lts,1,pre] x [ubuntu-latest, windows-latest] (preserves the old functional os coverage); [QA] on [lts,1]. - Isolate the QA checks (ExplicitImports, type-stability, AllocCheck allocation tests) into a gated GROUP=="QA" path with its own test/qa/Project.toml ([sources] DASSL path=../.., julia="1.10") and test/qa/qa.jl; runtests.jl activates/develops/instantiates it for QA. - Project.toml: drop AllocCheck/ExplicitImports from the root test target (now QA-isolated); add missing [compat] entries for the remaining [extras] (DAEProblemLibrary, ModelingToolkit, Test). julia compat already at the 1.10 LTS floor. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/Tests.yml | 16 +--------------- Project.toml | 9 ++++----- test/qa/Project.toml | 14 ++++++++++++++ test/qa/qa.jl | 21 +++++++++++++++++++++ test/runtests.jl | 37 +++++++++++++------------------------ test/test_groups.toml | 6 ++++++ 6 files changed, 59 insertions(+), 44 deletions(-) create mode 100644 test/qa/Project.toml create mode 100644 test/qa/qa.jl create mode 100644 test/test_groups.toml diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 0fd730c..c36b34f 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -14,19 +14,5 @@ concurrency: jobs: tests: - name: "Tests" - strategy: - fail-fast: false - matrix: - version: - - "1" - - "lts" - - "pre" - os: - - "ubuntu-latest" - - "windows-latest" - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - julia-version: "${{ matrix.version }}" - os: "${{ matrix.os }}" + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" secrets: "inherit" diff --git a/Project.toml b/Project.toml index cce8214..c7123e2 100644 --- a/Project.toml +++ b/Project.toml @@ -14,29 +14,28 @@ SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" [compat] -AllocCheck = "0.2" ArrayInterface = "7.25.0" BenchmarkTools = "1" +DAEProblemLibrary = "0.1" DiffEqBase = "7.5.5" -ExplicitImports = "1.4.2" JLArrays = "0.3" +ModelingToolkit = "10, 11" NonlinearSolve = "4.19.1" PrecompileTools = "1.2.1" Reexport = "1.2.2" SciMLBase = "3.18.0" SciMLLogging = "1.10.1, 2" SymbolicIndexingInterface = "0.3.48" +Test = "1" julia = "1.10" [extras] -AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AllocCheck", "BenchmarkTools", "DAEProblemLibrary", "ExplicitImports", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Test"] +test = ["BenchmarkTools", "DAEProblemLibrary", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Test"] diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..08695ef --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,14 @@ +[deps] +AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" +DASSL = "e993076c-0cfd-5d6b-a1ac-36489fdf7917" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +DASSL = {path = "../.."} + +[compat] +AllocCheck = "0.2" +ExplicitImports = "1.4.2" +julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..28d3676 --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,21 @@ +using DASSL +using Test + +@testset "QA" begin + @testset "Explicit Imports" begin + include(joinpath(@__DIR__, "..", "explicit_imports.jl")) + end + + @testset "Type Stability" begin + alg = dassl() + @test typeof(alg.maxorder) === Int + @test typeof(alg.factorize_jacobian) === Bool + + y0 = [1.0, 2.0] + cache = DASSL.alg_cache(alg, y0, nothing, 0.0, Val(true)) + @test isconcretetype(typeof(cache.jac_factorized)) + @test !(cache.jac_factorized isa Any && typeof(cache.jac_factorized) === Any) + end + + include(joinpath(@__DIR__, "..", "alloc_tests.jl")) +end diff --git a/test/runtests.jl b/test/runtests.jl index d98e336..e73024b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,13 @@ -using DASSL, Test -using LinearAlgebra: diagm, I +using Test -const GROUP = let g = get(ENV, "GROUP", "all") - isempty(g) ? "all" : g +const GROUP = let g = get(ENV, "GROUP", "All") + isempty(g) ? "All" : g end -if GROUP == "all" || GROUP == "core" +if GROUP == "All" || GROUP == "Core" + using DASSL + using LinearAlgebra: diagm, I + @testset "Testing maxorder" begin F(t, y, dy) = (dy + y .^ 2) Fy(t, y, dy) = diagm(0 => 2y) @@ -75,23 +77,10 @@ if GROUP == "all" || GROUP == "core" end end -if GROUP == "all" || GROUP == "QA" - @testset "QA" begin - @testset "Explicit Imports" begin - include("explicit_imports.jl") - end - - @testset "Type Stability" begin - alg = dassl() - @test typeof(alg.maxorder) === Int - @test typeof(alg.factorize_jacobian) === Bool - - y0 = [1.0, 2.0] - cache = DASSL.alg_cache(alg, y0, nothing, 0.0, Val(true)) - @test isconcretetype(typeof(cache.jac_factorized)) - @test !(cache.jac_factorized isa Any && typeof(cache.jac_factorized) === Any) - end - - include("alloc_tests.jl") - end +if GROUP == "QA" + import Pkg + Pkg.activate(joinpath(@__DIR__, "qa")) + Pkg.develop(path = joinpath(@__DIR__, "..")) + Pkg.instantiate() + include(joinpath(@__DIR__, "qa", "qa.jl")) end diff --git a/test/test_groups.toml b/test/test_groups.toml new file mode 100644 index 0000000..bb5bb51 --- /dev/null +++ b/test/test_groups.toml @@ -0,0 +1,6 @@ +[Core] +versions = ["lts", "1", "pre"] +os = ["ubuntu-latest", "windows-latest"] + +[QA] +versions = ["lts", "1"] From 93dc1bcbb48da80c00c179e9814675224171b267 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 9 Jun 2026 18:26:22 -0400 Subject: [PATCH 2/4] Add Pkg as test dependency for grouped-tests Core group The grouped runtests.jl uses Pkg for the QA group's Pkg.activate, but the Core group runs with project='.' (the root test env). Pkg was not a declared test dependency, so the Core job died with ArgumentError: Package Pkg not found in current path. Declare Pkg in [extras] and add it to [targets].test. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index c7123e2..9285141 100644 --- a/Project.toml +++ b/Project.toml @@ -35,7 +35,8 @@ DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["BenchmarkTools", "DAEProblemLibrary", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Test"] +test = ["BenchmarkTools", "DAEProblemLibrary", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Pkg", "Test"] From af9373188da5ea8359bffc34a568a1df8e10b639 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 9 Jun 2026 20:14:52 -0400 Subject: [PATCH 3/4] Restore stripped functional test deps to root test env The grouped-tests conversion removed functional test dependencies from the root test environment while isolating QA, breaking the Core group. Re-add the deps that the pre-conversion base test target listed (using their base UUIDs) so Core resolves and @testset/@safetestset/domain macros are defined. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9285141..6587c16 100644 --- a/Project.toml +++ b/Project.toml @@ -14,10 +14,12 @@ SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" [compat] +AllocCheck = "0.2" ArrayInterface = "7.25.0" BenchmarkTools = "1" DAEProblemLibrary = "0.1" DiffEqBase = "7.5.5" +ExplicitImports = "1.4.2" JLArrays = "0.3" ModelingToolkit = "10, 11" NonlinearSolve = "4.19.1" @@ -30,8 +32,10 @@ Test = "1" julia = "1.10" [extras] +AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" @@ -39,4 +43,4 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["BenchmarkTools", "DAEProblemLibrary", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Pkg", "Test"] +test = ["AllocCheck", "BenchmarkTools", "DAEProblemLibrary", "ExplicitImports", "JLArrays", "ModelingToolkit", "NonlinearSolve", "Pkg", "Test"] From 92722c358b702d3e9b539b085fe6f7ae5c9564f4 Mon Sep 17 00:00:00 2001 From: "Chris Rackauckas (Claude)" Date: Tue, 9 Jun 2026 20:40:18 -0400 Subject: [PATCH 4/4] Hoist functional usings to top level to fix Core-group macro UndefVarError The converted runtests.jl placed `using` statements inside a top-level `if GROUP ...` block that also used a macro (e.g. @testset) inline. Julia macro-expands the entire if block as one unit before the in-block `using` executes, so the macro was undefined (UndefVarError: @testset not defined in Main). Move the functional usings to top level (the QA-subenv usings that follow Pkg.activate stay in the QA block). Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- test/runtests.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index e73024b..abc51a1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,13 +1,12 @@ using Test +using DASSL +using LinearAlgebra: diagm, I const GROUP = let g = get(ENV, "GROUP", "All") isempty(g) ? "All" : g end if GROUP == "All" || GROUP == "Core" - using DASSL - using LinearAlgebra: diagm, I - @testset "Testing maxorder" begin F(t, y, dy) = (dy + y .^ 2) Fy(t, y, dy) = diagm(0 => 2y)