Skip to content

Commit 74f214c

Browse files
committed
refactor: setup SimpleNonlinearSolve.jl
1 parent 649a877 commit 74f214c

File tree

6 files changed

+140
-1
lines changed

6 files changed

+140
-1
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI (SimpleNonlinearSolve)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- "lib/SimpleNonlinearSolve/src/**"
9+
- "lib/SimpleNonlinearSolve/ext/**"
10+
- "lib/SimpleNonlinearSolve/test/**"
11+
- "lib/SimpleNonlinearSolve/Project.toml"
12+
- ".github/workflows/CI_SimpleNonlinearSolve.yml"
13+
- "lib/BracketingNonlinearSolve/src/**"
14+
- "lib/BracketingNonlinearSolve/ext/**"
15+
- "lib/BracketingNonlinearSolve/Project.toml"
16+
- "lib/NonlinearSolveBase/src/**"
17+
- "lib/NonlinearSolveBase/ext/**"
18+
- "lib/NonlinearSolveBase/Project.toml"
19+
push:
20+
branches:
21+
- master
22+
23+
concurrency:
24+
# Skip intermediate builds: always.
25+
# Cancel intermediate builds: only if it is a pull request build.
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
28+
29+
jobs:
30+
test:
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
version:
36+
- "min"
37+
- "1"
38+
os:
39+
- ubuntu-latest
40+
- macos-latest
41+
- windows-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: julia-actions/setup-julia@v2
45+
with:
46+
version: ${{ matrix.version }}
47+
- uses: actions/cache@v4
48+
env:
49+
cache-name: cache-artifacts
50+
with:
51+
path: ~/.julia/artifacts
52+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
53+
restore-keys: |
54+
${{ runner.os }}-test-${{ env.cache-name }}-
55+
${{ runner.os }}-test-
56+
${{ runner.os }}-
57+
- name: "Install Dependencies and Run Tests"
58+
run: |
59+
import Pkg
60+
Pkg.Registry.update()
61+
# Install packages present in subdirectories
62+
for path in ("lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
63+
Pkg.develop(; path)
64+
end
65+
Pkg.instantiate()
66+
Pkg.test(; coverage=true)
67+
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleNonlinearSolve {0}
68+
- uses: julia-actions/julia-processcoverage@v1
69+
with:
70+
directories: lib/SimpleNonlinearSolve/src,lib/SimpleNonlinearSolve/ext
71+
- uses: codecov/codecov-action@v4
72+
with:
73+
file: lcov.info
74+
token: ${{ secrets.CODECOV_TOKEN }}
75+
verbose: true
76+
fail_ci_if_error: true

lib/BracketingNonlinearSolve/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CommonSolve = "0.2.4"
2121
ConcreteStructs = "0.2.3"
2222
ForwardDiff = "0.10.36"
2323
NonlinearSolveBase = "1"
24-
PrecompileTools = "1.2.1"
24+
PrecompileTools = "1.2"
2525
SciMLBase = "2.50"
2626
julia = "1.10"
2727

lib/SimpleNonlinearSolve/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Julia Computing, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

lib/SimpleNonlinearSolve/Project.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name = "SimpleNonlinearSolve"
2+
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
3+
authors = ["SciML"]
4+
version = "1.13.0"
5+
6+
[deps]
7+
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
8+
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
9+
BracketingNonlinearSolve = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e"
10+
NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
11+
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
12+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
13+
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
14+
15+
[compat]
16+
ADTypes = "1.2"
17+
ArrayInterface = "7.16"
18+
BracketingNonlinearSolve = "1"
19+
NonlinearSolveBase = "1"
20+
PrecompileTools = "1.2"
21+
Reexport = "1.2"
22+
SciMLBase = "2.50"
23+
julia = "1.10"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module SimpleNonlinearSolve
2+
3+
using ADTypes: ADTypes, AbstractADType, AutoFiniteDiff, AutoForwardDiff,
4+
AutoPolyesterForwardDiff
5+
using PrecompileTools: @compile_workload, @setup_workload
6+
using Reexport: @reexport
7+
@reexport using SciMLBase # I don't like this but needed to avoid a breaking change
8+
9+
using BracketingNonlinearSolve: Alefeld, Bisection, Brent, Falsi, ITP, Ridder
10+
11+
@setup_workload begin
12+
@compile_workload begin end
13+
end
14+
15+
export AutoFiniteDiff, AutoForwardDiff, AutoPolyesterForwardDiff
16+
17+
export Alefeld, Bisection, Brent, Falsi, ITP, Ridder
18+
19+
end

lib/SimpleNonlinearSolve/test/runtests.jl

Whitespace-only changes.

0 commit comments

Comments
 (0)