Skip to content

Commit

Permalink
refactor: setup SimpleNonlinearSolve.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Sep 17, 2024
1 parent 649a877 commit 74f214c
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 1 deletion.
76 changes: 76 additions & 0 deletions .github/workflows/CI_SimpleNonlinearSolve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI (SimpleNonlinearSolve)

on:
pull_request:
branches:
- master
paths:
- "lib/SimpleNonlinearSolve/src/**"
- "lib/SimpleNonlinearSolve/ext/**"
- "lib/SimpleNonlinearSolve/test/**"
- "lib/SimpleNonlinearSolve/Project.toml"
- ".github/workflows/CI_SimpleNonlinearSolve.yml"
- "lib/BracketingNonlinearSolve/src/**"
- "lib/BracketingNonlinearSolve/ext/**"
- "lib/BracketingNonlinearSolve/Project.toml"
- "lib/NonlinearSolveBase/src/**"
- "lib/NonlinearSolveBase/ext/**"
- "lib/NonlinearSolveBase/Project.toml"
push:
branches:
- master

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "min"
- "1"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: "Install Dependencies and Run Tests"
run: |
import Pkg
Pkg.Registry.update()
# Install packages present in subdirectories
for path in ("lib/NonlinearSolveBase", "lib/BracketingNonlinearSolve")
Pkg.develop(; path)
end
Pkg.instantiate()
Pkg.test(; coverage=true)
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleNonlinearSolve {0}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: lib/SimpleNonlinearSolve/src,lib/SimpleNonlinearSolve/ext
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion lib/BracketingNonlinearSolve/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CommonSolve = "0.2.4"
ConcreteStructs = "0.2.3"
ForwardDiff = "0.10.36"
NonlinearSolveBase = "1"
PrecompileTools = "1.2.1"
PrecompileTools = "1.2"
SciMLBase = "2.50"
julia = "1.10"

Expand Down
21 changes: 21 additions & 0 deletions lib/SimpleNonlinearSolve/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Julia Computing, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions lib/SimpleNonlinearSolve/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "SimpleNonlinearSolve"
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
authors = ["SciML"]
version = "1.13.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
BracketingNonlinearSolve = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e"
NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"

[compat]
ADTypes = "1.2"
ArrayInterface = "7.16"
BracketingNonlinearSolve = "1"
NonlinearSolveBase = "1"
PrecompileTools = "1.2"
Reexport = "1.2"
SciMLBase = "2.50"
julia = "1.10"
19 changes: 19 additions & 0 deletions lib/SimpleNonlinearSolve/src/SimpleNonlinearSolve.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module SimpleNonlinearSolve

using ADTypes: ADTypes, AbstractADType, AutoFiniteDiff, AutoForwardDiff,
AutoPolyesterForwardDiff
using PrecompileTools: @compile_workload, @setup_workload
using Reexport: @reexport
@reexport using SciMLBase # I don't like this but needed to avoid a breaking change

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

@setup_workload begin
@compile_workload begin end
end

export AutoFiniteDiff, AutoForwardDiff, AutoPolyesterForwardDiff

export Alefeld, Bisection, Brent, Falsi, ITP, Ridder

end
Empty file.

0 comments on commit 74f214c

Please sign in to comment.