Skip to content

Commit

Permalink
ci(github-actions): nonlinearsolvebase and bracketingnonlinearsolve
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 29, 2024
1 parent feae171 commit 98508a5
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
end
Pkg.develop(dev_pks);
Pkg.instantiate();
Pkg.test(; coverage=true)'
Pkg.test(; coverage="user")'
agents:
queue: "juliagpu"
cuda: "*"
Expand Down Expand Up @@ -47,7 +47,7 @@ steps:
end
Pkg.develop(dev_pks);
Pkg.instantiate();
Pkg.test(; coverage=true)'
Pkg.test(; coverage="user")'
agents:
queue: "juliagpu"
cuda: "*"
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/CI_BracketingNonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
- master
paths:
- "lib/BracketingNonlinearSolve/**"
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_BracketingNonlinearSolve.yml"
- "lib/NonlinearSolveBase/**"
- "lib/SciMLJacobianOperators/**"
push:
branches:
- master
Expand All @@ -25,7 +26,7 @@ jobs:
fail-fast: false
matrix:
version:
- "min"
- "lts"
- "1"
os:
- ubuntu-latest
Expand All @@ -52,16 +53,16 @@ jobs:
Pkg.Registry.update()
# Install packages present in subdirectories
dev_pks = Pkg.PackageSpec[]
for path in ("lib/NonlinearSolveBase",)
for path in ("lib/NonlinearSolveBase", "lib/SciMLJacobianOperators")
push!(dev_pks, Pkg.PackageSpec(; path))
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/BracketingNonlinearSolve {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/BracketingNonlinearSolve/src,lib/BracketingNonlinearSolve/ext
directories: lib/BracketingNonlinearSolve/src,lib/BracketingNonlinearSolve/ext,lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI_NonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- Misc
- Wrappers
version:
- "min"
- "lts"
- "1"
os:
- ubuntu-latest
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
env:
GROUP: ${{ matrix.group }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/CI_NonlinearSolveBase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- "lib/NonlinearSolveBase/**"
- ".github/workflows/CI_NonlinearSolveBase.yml"
- "lib/SciMLJacobianOperators/**"
push:
branches:
- master
Expand All @@ -24,7 +25,7 @@ jobs:
fail-fast: false
matrix:
version:
- "min"
- "lts"
- "1"
os:
- ubuntu-latest
Expand Down Expand Up @@ -56,11 +57,11 @@ jobs:
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/NonlinearSolveBase {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext
directories: lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext,lib/SciMLJacobianOperators/src
- uses: codecov/codecov-action@v4
with:
file: lcov.info
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI_SciMLJacobianOperators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
version:
- "min"
- "lts"
- "1"
os:
- ubuntu-latest
Expand All @@ -50,7 +50,7 @@ jobs:
import Pkg
Pkg.Registry.update()
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SciMLJacobianOperators {0}
- uses: julia-actions/julia-processcoverage@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI_SimpleNonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
version:
- "min"
- "lts"
- "1"
os:
- ubuntu-latest
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleNonlinearSolve {0}
env:
GROUP: ${{ matrix.group }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
end
Pkg.develop(dev_pks)
Pkg.instantiate()
Pkg.test(; coverage=true)
Pkg.test(; coverage="user")
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
env:
GROUP: ${{ matrix.group }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# force it to use this PR's version of the package
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
Pkg.update()
Pkg.test(coverage=true) # resolver may fail with test time deps
Pkg.test(coverage="user") # resolver may fail with test time deps
catch err
err isa Pkg.Resolve.ResolverError || rethrow()
# If we can't resolve that means this is incompatible by SemVer and this is fine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ using SciMLBase: SciMLBase, IntervalNonlinearProblem

using BracketingNonlinearSolve: Bisection, Brent, Alefeld, Falsi, ITP, Ridder

const DualIntervalNonlinearProblem{T, V, P} = IntervalNonlinearProblem{
uType, iip, <:Union{<:Dual{T, V, P}, <:AbstractArray{<:Dual{T, V, P}}}
} where {uType, iip}

for algT in (Bisection, Brent, Alefeld, Falsi, ITP, Ridder)
@eval function CommonSolve.solve(
prob::IntervalNonlinearProblem{
uType, iip, <:Union{<:Dual{T, V, P}, <:AbstractArray{<:Dual{T, V, P}}}},
alg::$(algT),
args...;
kwargs...) where {uType, iip, T, V, P}
prob::DualIntervalNonlinearProblem{T, V, P}, alg::$(algT), args...;
kwargs...
) where {T, V, P}
sol, partials = nonlinearsolve_forwarddiff_solve(prob, alg, args...; kwargs...)
dual_soln = nonlinearsolve_dual_solution(sol.u, partials, prob.p)
return SciMLBase.build_solution(
prob, alg, dual_soln, sol.resid; sol.retcode, sol.stats,
sol.original, left = Dual{T, V, P}(sol.left, partials),
right = Dual{T, V, P}(sol.right, partials))
prob, alg, dual_soln, sol.resid;
sol.retcode, sol.stats, sol.original,
left = Dual{T, V, P}(sol.left, partials),
right = Dual{T, V, P}(sol.right, partials)
)
end
end

Expand Down
7 changes: 6 additions & 1 deletion lib/BracketingNonlinearSolve/test/qa_tests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
@testitem "Aqua" tags=[:core] begin
using Aqua, BracketingNonlinearSolve

Aqua.test_all(BracketingNonlinearSolve; piracies = false, ambiguities = false)
Aqua.test_all(
BracketingNonlinearSolve;
piracies = false, ambiguities = false, stale_deps = false, deps_compat = false
)
Aqua.test_stale_deps(BracketingNonlinearSolve; ignore = [:SciMLJacobianOperators])
Aqua.test_deps_compat(BracketingNonlinearSolve; ignore = [:SciMLJacobianOperators])
Aqua.test_piracies(BracketingNonlinearSolve; treat_as_own = [IntervalNonlinearProblem])
Aqua.test_ambiguities(BracketingNonlinearSolve; recursive = false)
end
Expand Down
5 changes: 4 additions & 1 deletion lib/NonlinearSolveBase/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ using InteractiveUtils, Test
@testset "Aqua" begin
using Aqua, NonlinearSolveBase

Aqua.test_all(NonlinearSolveBase; piracies = false, ambiguities = false)
Aqua.test_all(
NonlinearSolveBase; piracies = false, ambiguities = false, stale_deps = false
)
Aqua.test_stale_deps(NonlinearSolveBase; ignore = [:TimerOutputs])
Aqua.test_piracies(NonlinearSolveBase)
Aqua.test_ambiguities(NonlinearSolveBase; recursive = false)
end
Expand Down

0 comments on commit 98508a5

Please sign in to comment.