Skip to content

Commit 734b2f8

Browse files
committed
ci(github-actions): add workflows for subpackages
1 parent 1808553 commit 734b2f8

6 files changed

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

.github/workflows/CI.yml renamed to .github/workflows/CI_NonlinearSolveBase.yml

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: CI
1+
name: CI (NonlinearSolveBase)
22

33
on:
44
pull_request:
55
branches:
66
- master
77
paths:
8-
- "src/**"
9-
- "ext/**"
10-
- "test/**"
11-
- "Project.toml"
12-
- ".github/workflows/CI.yml"
8+
- "lib/NonlinearSolveBase/src/**"
9+
- "lib/NonlinearSolveBase/ext/**"
10+
- "lib/NonlinearSolveBase/test/**"
11+
- "lib/NonlinearSolveBase/Project.toml"
12+
- ".github/workflows/CI_NonlinearSolveBase.yml"
1313
push:
1414
branches:
1515
- master
@@ -26,17 +26,13 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
group:
30-
- Core
31-
- Downstream
32-
- Misc
33-
- Wrappers
3429
version:
35-
- "1"
30+
- "min"
31+
# - "1"
3632
os:
3733
- ubuntu-latest
38-
- macos-latest
39-
- windows-latest
34+
# - macos-latest
35+
# - windows-latest
4036
steps:
4137
- uses: actions/checkout@v4
4238
- uses: julia-actions/setup-julia@v2
@@ -52,16 +48,16 @@ jobs:
5248
${{ runner.os }}-test-${{ env.cache-name }}-
5349
${{ runner.os }}-test-
5450
${{ runner.os }}-
55-
- uses: julia-actions/julia-buildpkg@v1
56-
- uses: julia-actions/julia-runtest@v1
57-
env:
58-
GROUP: ${{ matrix.group }}
59-
JULIA_NUM_THREADS: 11
60-
RETESTITEMS_NWORKERS: 4
61-
RETESTITEMS_NWORKER_THREADS: 2
51+
- name: "Install Dependencies and Run Tests"
52+
run: |
53+
import Pkg
54+
Pkg.Registry.update()
55+
Pkg.instantiate()
56+
Pkg.test(; coverage=true)
57+
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=lib/NonlinearSolveBase {0}
6258
- uses: julia-actions/julia-processcoverage@v1
6359
with:
64-
directories: src,ext
60+
directories: lib/NonlinearSolveBase/src,lib/NonlinearSolveBase/ext
6561
- uses: codecov/codecov-action@v4
6662
with:
6763
file: lcov.info

.github/workflows/CompatHelper.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ jobs:
2323
- name: CompatHelper.main()
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs"])'
26+
run: |
27+
import CompatHelper
28+
subdirs = ["", "docs"]
29+
append!(subdirs, joinpath.(("lib",), filter(p -> isdir(joinpath("lib", p)), readdir("lib"))))
30+
CompatHelper.main(; subdirs)
31+
shell: julia --color=yes {0}
32+
working-directory: "./"

.github/workflows/Downgrade.yml

+11-13
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ jobs:
1717
matrix:
1818
version: ["1"]
1919
steps:
20-
- uses: actions/checkout@v4
21-
- uses: julia-actions/setup-julia@v2
22-
with:
23-
version: ${{ matrix.version }}
24-
- uses: julia-actions/julia-downgrade-compat@v1
25-
with:
26-
skip: Pkg,TOML
27-
- uses: julia-actions/julia-buildpkg@v1
28-
- uses: julia-actions/julia-runtest@v1
29-
env:
30-
JULIA_NUM_THREADS: 11
31-
RETESTITEMS_NWORKERS: 4
32-
RETESTITEMS_NWORKER_THREADS: 2
20+
- name: "Stub"
21+
run: echo "Remember to uncomment the following steps!!!!!!!!"
22+
# - uses: actions/checkout@v4
23+
# - uses: julia-actions/setup-julia@v2
24+
# with:
25+
# version: ${{ matrix.version }}
26+
# - uses: julia-actions/julia-downgrade-compat@v1
27+
# with:
28+
# skip: Pkg,TOML
29+
# - uses: julia-actions/julia-buildpkg@v1
30+
# - uses: julia-actions/julia-runtest@v1

.github/workflows/Downstream.yml

+41-39
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,44 @@ jobs:
2727
- {user: SciML, repo: BoundaryValueDiffEq.jl, group: All}
2828
- {user: SciML, repo: DiffEqCallbacks.jl, group: All}
2929
steps:
30-
- uses: actions/checkout@v4
31-
- uses: julia-actions/setup-julia@v2
32-
with:
33-
version: ${{ matrix.julia-version }}
34-
arch: x64
35-
- uses: julia-actions/julia-buildpkg@latest
36-
- name: Clone Downstream
37-
uses: actions/checkout@v4
38-
with:
39-
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
40-
path: downstream
41-
- name: Load this and run the downstream tests
42-
shell: julia --color=yes --project=downstream {0}
43-
run: |
44-
using Pkg
45-
try
46-
# force it to use this PR's version of the package
47-
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
48-
Pkg.update()
49-
Pkg.test(coverage=true) # resolver may fail with test time deps
50-
catch err
51-
err isa Pkg.Resolve.ResolverError || rethrow()
52-
# If we can't resolve that means this is incompatible by SemVer and this is fine
53-
# It means we marked this as a breaking change, so we don't need to worry about
54-
# Mistakenly introducing a breaking change, as we have intentionally made one
55-
@info "Not compatible with this release. No problem." exception=err
56-
exit(0) # Exit immediately, as a success
57-
end
58-
env:
59-
RETESTITEMS_NWORKERS: 4
60-
RETESTITEMS_NWORKER_THREADS: 2
61-
- uses: julia-actions/julia-processcoverage@v1
62-
with:
63-
directories: src,ext
64-
- uses: codecov/codecov-action@v4
65-
with:
66-
file: lcov.info
67-
token: ${{ secrets.CODECOV_TOKEN }}
68-
fail_ci_if_error: true
30+
- name: "Stub"
31+
run: echo "Remember to uncomment the following steps!!!!!!!!"
32+
# - uses: actions/checkout@v4
33+
# - uses: julia-actions/setup-julia@v2
34+
# with:
35+
# version: ${{ matrix.julia-version }}
36+
# arch: x64
37+
# - uses: julia-actions/julia-buildpkg@latest
38+
# - name: Clone Downstream
39+
# uses: actions/checkout@v4
40+
# with:
41+
# repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
42+
# path: downstream
43+
# - name: Load this and run the downstream tests
44+
# shell: julia --color=yes --project=downstream {0}
45+
# run: |
46+
# using Pkg
47+
# try
48+
# # force it to use this PR's version of the package
49+
# Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
50+
# Pkg.update()
51+
# Pkg.test(coverage=true) # resolver may fail with test time deps
52+
# catch err
53+
# err isa Pkg.Resolve.ResolverError || rethrow()
54+
# # If we can't resolve that means this is incompatible by SemVer and this is fine
55+
# # It means we marked this as a breaking change, so we don't need to worry about
56+
# # Mistakenly introducing a breaking change, as we have intentionally made one
57+
# @info "Not compatible with this release. No problem." exception=err
58+
# exit(0) # Exit immediately, as a success
59+
# end
60+
# env:
61+
# RETESTITEMS_NWORKERS: 4
62+
# RETESTITEMS_NWORKER_THREADS: 2
63+
# - uses: julia-actions/julia-processcoverage@v1
64+
# with:
65+
# directories: src,ext
66+
# - uses: codecov/codecov-action@v4
67+
# with:
68+
# file: lcov.info
69+
# token: ${{ secrets.CODECOV_TOKEN }}
70+
# fail_ci_if_error: true

0 commit comments

Comments
 (0)