Skip to content

Commit 4f52f5a

Browse files
committed
add License and CI
1 parent 878dc5f commit 4f52f5a

File tree

2 files changed

+141
-0
lines changed

2 files changed

+141
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: CI (SimpleNonlinearSolve)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- "lib/SimpleImplicitDiscreteSolve/**"
9+
- ".github/workflows/CI_SimpleImplicitDiscreteSolve.yml"
10+
- "lib/SimpleNonlinearSolve/**"
11+
push:
12+
branches:
13+
- master
14+
15+
concurrency:
16+
# Skip intermediate builds: always.
17+
# Cancel intermediate builds: only if it is a pull request build.
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
20+
21+
jobs:
22+
test:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- "1.10"
29+
- "1"
30+
os:
31+
- ubuntu-latest
32+
- macos-latest
33+
- windows-latest
34+
group:
35+
- core
36+
- adjoint
37+
- alloc_check
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: julia-actions/setup-julia@v2
41+
with:
42+
version: ${{ matrix.version }}
43+
- uses: actions/cache@v4
44+
env:
45+
cache-name: cache-artifacts
46+
with:
47+
path: ~/.julia/artifacts
48+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
49+
restore-keys: |
50+
${{ runner.os }}-test-${{ env.cache-name }}-
51+
${{ runner.os }}-test-
52+
${{ runner.os }}-
53+
- name: "Install Dependencies and Run Tests"
54+
run: |
55+
import Pkg
56+
Pkg.Registry.update()
57+
# Install packages present in subdirectories
58+
dev_pks = Pkg.PackageSpec[]
59+
for path in ("lib/SimpleImplicitDiscreteSolve", "lib/SimpleNonlinearSolve")
60+
push!(dev_pks, Pkg.PackageSpec(; path))
61+
end
62+
Pkg.develop(dev_pks)
63+
Pkg.instantiate()
64+
Pkg.test(; coverage="user")
65+
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleImplicitDiscreteSolve {0}
66+
env:
67+
GROUP: ${{ matrix.group }}
68+
- uses: julia-actions/julia-processcoverage@v1
69+
with:
70+
directories: lib/SimpleNonlinearSolve/src, lib/SimpleNonlinearSolve/ext, lib/SimpleImplicitDiscreteSolve/src
71+
- uses: codecov/codecov-action@v5
72+
with:
73+
file: lcov.info
74+
token: ${{ secrets.CODECOV_TOKEN }}
75+
verbose: true
76+
fail_ci_if_error: false
77+
78+
downgrade:
79+
runs-on: ubuntu-latest
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
version:
84+
- "1.10"
85+
group:
86+
- core
87+
- adjoint
88+
- alloc_check
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: julia-actions/setup-julia@v2
92+
with:
93+
version: ${{ matrix.version }}
94+
- uses: julia-actions/julia-downgrade-compat@v1
95+
with:
96+
skip: SimpleImplicitDiscreteSolve
97+
- name: "Install Dependencies and Run Tests"
98+
run: |
99+
import Pkg
100+
Pkg.Registry.update()
101+
# Install packages present in subdirectories
102+
dev_pks = Pkg.PackageSpec[]
103+
for path in ("lib/SimpleImplicitDiscreteSolve", "lib/SimpleNonlinearSolve")
104+
push!(dev_pks, Pkg.PackageSpec(; path))
105+
end
106+
Pkg.develop(dev_pks)
107+
Pkg.instantiate()
108+
Pkg.test(; coverage="user")
109+
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/SimpleImplicitDiscreteSolve {0}
110+
env:
111+
GROUP: ${{ matrix.group }}
112+
- uses: julia-actions/julia-processcoverage@v1
113+
with:
114+
directories: lib/SimpleImplicitDiscreteSolve/src, lib/SimpleNonlinearSolve/ext, lib/SimpleNonlinearSolve/src
115+
- uses: codecov/codecov-action@v5
116+
with:
117+
file: lcov.info
118+
token: ${{ secrets.CODECOV_TOKEN }}
119+
verbose: true
120+
fail_ci_if_error: false
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) 2024 SciML
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.

0 commit comments

Comments
 (0)