diff --git a/.github/workflows/CI_NonlinearSolve.yml b/.github/workflows/CI_NonlinearSolve.yml index 943073d94..e045e1e37 100644 --- a/.github/workflows/CI_NonlinearSolve.yml +++ b/.github/workflows/CI_NonlinearSolve.yml @@ -36,6 +36,7 @@ jobs: - downstream - wrappers - misc + - nopre version: - "1" - "lts" @@ -43,6 +44,10 @@ jobs: os: - ubuntu-latest - macos-latest + exclude: + # Don't run nopre tests on prerelease Julia + - group: nopre + version: "pre" steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 diff --git a/.github/workflows/CI_SimpleNonlinearSolve.yml b/.github/workflows/CI_SimpleNonlinearSolve.yml index 4c95a3f99..a4dbf4464 100644 --- a/.github/workflows/CI_SimpleNonlinearSolve.yml +++ b/.github/workflows/CI_SimpleNonlinearSolve.yml @@ -34,6 +34,11 @@ jobs: - core - adjoint - alloc_check + - nopre + exclude: + # Don't run nopre tests on prerelease Julia + - group: nopre + version: "pre" steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 diff --git a/Project.toml b/Project.toml index aa91c7420..6e897bae3 100644 --- a/Project.toml +++ b/Project.toml @@ -69,7 +69,6 @@ CommonSolve = "0.2.4" ConcreteStructs = "0.2.3" DiffEqBase = "6.158.3" DifferentiationInterface = "0.6.18, 0.7" -Enzyme = "0.13.11" ExplicitImports = "1.5" FastClosures = "0.3.2" FastLevenbergMarquardt = "0.1" @@ -123,7 +122,6 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" -Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176" @@ -170,5 +168,5 @@ path = "lib/NonlinearSolveSpectralMethods" path = "lib/SimpleNonlinearSolve" [targets] -test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "Enzyme", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote"] +test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote"] diff --git a/test/23_test_problems_tests.jl b/test/23_test_problems_tests.jl index 684dc8967..c4215cebb 100644 --- a/test/23_test_problems_tests.jl +++ b/test/23_test_problems_tests.jl @@ -39,7 +39,7 @@ end export test_on_library, problems, dicts end -@testitem "23 Test Problems: PolyAlgorithms" setup=[RobustnessTesting] tags=[:core] begin +@testitem "23 Test Problems: PolyAlgorithms" setup=[RobustnessTesting] tags=[:nopre] begin alg_ops=(RobustMultiNewton(), FastShortcutNonlinearPolyalg()) broken_tests=Dict(alg=>Int[] for alg in alg_ops) diff --git a/test/core_tests.jl b/test/core_tests.jl index fc0bb2026..76a3a9187 100644 --- a/test/core_tests.jl +++ b/test/core_tests.jl @@ -17,7 +17,7 @@ @test sol1.u ≈ sol2.u end -@testitem "Basic PolyAlgorithms" tags=[:core] begin +@testitem "Basic PolyAlgorithms" tags=[:nopre] begin f(u, p) = u .* u .- 2 u0 = [1.0, 1.0] @@ -60,7 +60,7 @@ end end end -@testitem "PolyAlgorithms Autodiff" tags=[:core] begin +@testitem "PolyAlgorithms Autodiff" tags=[:nopre] begin cache = zeros(2) function f(du, u, p) cache .= u .* u @@ -126,7 +126,7 @@ end @test SciMLBase.successful_retcode(sol.retcode) end -@testitem "Ensemble Nonlinear Problems" tags=[:core] begin +@testitem "Ensemble Nonlinear Problems" tags=[:nopre] begin prob_func(prob, i, repeat) = remake(prob; u0 = prob.u0[:, i]) prob_nls_oop = NonlinearProblem((u, p) -> u .* u .- p, rand(4, 128), 2.0) @@ -350,7 +350,7 @@ end end end -@testitem "Out-of-place Matrix Resizing" tags=[:core] begin +@testitem "Out-of-place Matrix Resizing" tags=[:nopre] begin using StableRNGs ff(u, p) = u .* u .- p @@ -368,7 +368,7 @@ end end end -@testitem "Inplace Matrix Resizing" tags=[:core] begin +@testitem "Inplace Matrix Resizing" tags=[:nopre] begin using StableRNGs fiip(du, u, p) = (du .= u .* u .- p) @@ -437,7 +437,7 @@ end @test sol.retcode == ReturnCode.StalledSuccess end -@testitem "Default Algorithm Singular Handling" tags=[:core] begin +@testitem "Default Algorithm Singular Handling" tags=[:nopre] begin f(u, p) = [u[1]^2 - 2u[1] + 1, sum(u)] prob = NonlinearProblem(f, [1.0, 1.0]) sol = solve(prob) diff --git a/test/forward_ad_tests.jl b/test/forward_ad_tests.jl index f3dd8746e..9984c0a0b 100644 --- a/test/forward_ad_tests.jl +++ b/test/forward_ad_tests.jl @@ -62,7 +62,7 @@ compatible(::KINSOL, ::Val{:oop_cache}) = false export test_f!, test_f, jacobian_f, solve_with, compatible end -@testitem "ForwardDiff.jl Integration" setup=[ForwardADTesting] tags=[:core] begin +@testitem "ForwardDiff.jl Integration" setup=[ForwardADTesting] tags=[:nopre] begin @testset for alg in ( NewtonRaphson(), TrustRegion(), diff --git a/test/runtests.jl b/test/runtests.jl index bfdd07b35..16f697d67 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -9,6 +9,12 @@ if GROUP == "all" || GROUP == "downstream" push!(EXTRA_PKGS, Pkg.PackageSpec("ModelingToolkit")) push!(EXTRA_PKGS, Pkg.PackageSpec("SymbolicIndexingInterface")) end +if GROUP == "all" || GROUP == "nopre" + # Only add Enzyme for nopre group if not on prerelease Julia + if isempty(VERSION.prerelease) + push!(EXTRA_PKGS, Pkg.PackageSpec("Enzyme")) + end +end length(EXTRA_PKGS) ≥ 1 && Pkg.add(EXTRA_PKGS) const RETESTITEMS_NWORKERS = parse(