diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index 2ea2136..b8e9e3b 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -12,6 +12,7 @@ on: - 'docs/**' jobs: test: + if: false # Disabled pending dependency updates - see issue #58 runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index e95473f..87760c5 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -22,7 +22,14 @@ jobs: - "1" - "lts" - "pre" + group: + - "Core" + - "NoPre" + exclude: + - version: "pre" + group: "NoPre" uses: "SciML/.github/.github/workflows/tests.yml@v1" with: julia-version: "${{ matrix.version }}" + group: "${{ matrix.group }}" secrets: "inherit" diff --git a/Project.toml b/Project.toml index b5cfb31..d006f09 100644 --- a/Project.toml +++ b/Project.toml @@ -13,17 +13,15 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" DiffEqBase = "6.62" ExplicitImports = "1.14.0" GeometricIntegrators = "0.15" -JET = "0.9, 0.10, 0.11" Reexport = "0.2, 1" SciMLBase = "2" julia = "1.10" [extras] -AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" -JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AllocCheck", "ExplicitImports", "JET", "ODEProblemLibrary", "Test"] +test = ["ExplicitImports", "ODEProblemLibrary", "Pkg", "Test"] diff --git a/src/GeometricIntegratorsDiffEq.jl b/src/GeometricIntegratorsDiffEq.jl index 6a6d28c..172c2e7 100644 --- a/src/GeometricIntegratorsDiffEq.jl +++ b/src/GeometricIntegratorsDiffEq.jl @@ -2,7 +2,7 @@ module GeometricIntegratorsDiffEq using Reexport: Reexport, @reexport @reexport using DiffEqBase: DiffEqBase -using SciMLBase: SciMLBase, ReturnCode, check_keywords, isinplace, warn_compat +using SciMLBase: SciMLBase, ReturnCode, check_keywords, warn_compat using GeometricIntegrators: GeometricIntegrators, CrankNicolson, Crouzeix, ExplicitEuler, ExplicitMidpoint, Gauss, Heun2, Heun3, ImplicitEuler, diff --git a/test/nopre/Project.toml b/test/nopre/Project.toml new file mode 100644 index 0000000..3f36bca --- /dev/null +++ b/test/nopre/Project.toml @@ -0,0 +1,9 @@ +[deps] +AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" +GeometricIntegratorsDiffEq = "5a33fad7-5ce4-5983-9f5d-5f26ceab5c96" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] +AllocCheck = "0.1, 0.2" +JET = "0.9, 0.10, 0.11" diff --git a/test/alloc_tests.jl b/test/nopre/alloc_tests.jl similarity index 100% rename from test/alloc_tests.jl rename to test/nopre/alloc_tests.jl diff --git a/test/jet_tests.jl b/test/nopre/jet.jl similarity index 100% rename from test/jet_tests.jl rename to test/nopre/jet.jl diff --git a/test/runtests.jl b/test/runtests.jl index c82adf9..1500b98 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,103 +1,109 @@ -using GeometricIntegratorsDiffEq +using Pkg using Test -using GeometricIntegrators -using DiffEqBase: solve, ReturnCode, SecondOrderODEProblem -import ODEProblemLibrary: prob_ode_2Dlinear +const GROUP = get(ENV, "GROUP", "All") -@testset "GeometricIntegratorsDiffEq" begin - @testset "Standard ODE Problems" begin - prob = prob_ode_2Dlinear +if GROUP == "All" || GROUP == "Core" + using GeometricIntegratorsDiffEq + using GeometricIntegrators + using DiffEqBase: solve, ReturnCode, SecondOrderODEProblem + import ODEProblemLibrary: prob_ode_2Dlinear - sol = solve(prob, GIEuler(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIMidpoint(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIHeun2(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIHeun3(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRalston2(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRalston3(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRunge(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIKutta(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRK416(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRK438(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GISSPRK3(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GICrankNicolson(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIKraaijevangerSpijker(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIQinZhang(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GICrouzeix(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIImplicitEuler(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIImplicitMidpoint(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GISRK3(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIGLRK(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRadauIA(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GIRadauIIA(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIA(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIB(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIC(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIC̄(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIID(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIE(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIF(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - end + @testset "GeometricIntegratorsDiffEq" begin + @testset "Standard ODE Problems" begin + prob = prob_ode_2Dlinear - @testset "Second Order ODE Problems" begin - # Second order ODE problem - use the new 5-argument convention with p parameter - u0 = zeros(2) - v0 = ones(2) - f2 = function (dv, v, u, p, t) - dv .= -u + sol = solve(prob, GIEuler(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIMidpoint(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIHeun2(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIHeun3(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRalston2(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRalston3(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRunge(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIKutta(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRK416(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRK438(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GISSPRK3(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GICrankNicolson(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIKraaijevangerSpijker(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIQinZhang(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GICrouzeix(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIImplicitEuler(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIImplicitMidpoint(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GISRK3(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIGLRK(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRadauIA(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GIRadauIIA(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIA(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIB(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIC(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIC̄(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIID(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIE(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIF(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success end - prob = SecondOrderODEProblem{true}(f2, v0, u0, (0.0, 5.0)) - sol = solve(prob, GISymplecticEulerA(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GISymplecticEulerB(), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIAIIIB(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - sol = solve(prob, GILobattoIIIBIIIA(2), dt = 0.1) - @test sol.retcode == ReturnCode.Success - end -end # testset GeometricIntegratorsDiffEq + @testset "Second Order ODE Problems" begin + # Second order ODE problem - use the new 5-argument convention with p parameter + u0 = zeros(2) + v0 = ones(2) + f2 = function (dv, v, u, p, t) + dv .= -u + end + prob = SecondOrderODEProblem{true}(f2, v0, u0, (0.0, 5.0)) -# Run ExplicitImports tests -if get(ENV, "GROUP", "All") == "All" || get(ENV, "GROUP", "") == "ExplicitImports" - include("explicit_imports_test.jl") -end + sol = solve(prob, GISymplecticEulerA(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GISymplecticEulerB(), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIAIIIB(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + sol = solve(prob, GILobattoIIIBIIIA(2), dt = 0.1) + @test sol.retcode == ReturnCode.Success + end + end # testset GeometricIntegratorsDiffEq -# Run allocation tests if AllocCheck is available -if get(ENV, "GROUP", "All") == "All" || get(ENV, "GROUP", "") == "Nopre" - include("alloc_tests.jl") + # Run ExplicitImports tests + include("explicit_imports_test.jl") end -# Run JET static analysis tests -if get(ENV, "GROUP", "All") == "All" || get(ENV, "GROUP", "") == "JET" - include("jet_tests.jl") +# Run NoPre tests (JET and AllocCheck) in a separate environment +if GROUP == "NoPre" + Pkg.activate("nopre") + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + Pkg.instantiate() + @time @testset "JET Tests" begin + include("nopre/jet.jl") + end + @time @testset "AllocCheck Tests" begin + include("nopre/alloc_tests.jl") + end end