Skip to content

Commit 34bf4fa

Browse files
Merge pull request #13 from SciML/sb/ci
ci: fix CI and standardize things
2 parents eec597c + 38514d2 commit 34bf4fa

File tree

8 files changed

+68
-68
lines changed

8 files changed

+68
-68
lines changed

.github/workflows/CI.yml

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,34 @@ on:
33
push:
44
branches:
55
- main
6-
tags: ['*']
6+
paths-ignore:
7+
- 'docs/**'
78
pull_request:
8-
workflow_dispatch:
9-
concurrency:
10-
# Skip intermediate builds: always.
11-
# Cancel intermediate builds: only if it is a pull request build.
12-
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
9+
paths-ignore:
10+
- 'docs/**'
1411
jobs:
1512
test:
16-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1713
runs-on: ${{ matrix.os }}
18-
timeout-minutes: 60
19-
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20-
actions: write
21-
contents: read
2214
strategy:
2315
fail-fast: false
2416
matrix:
2517
version:
26-
- '1.10'
27-
- 'nightly'
18+
- '1'
2819
os:
2920
- ubuntu-latest
30-
arch:
31-
- x64
3221
steps:
3322
- uses: actions/checkout@v4
3423
- uses: julia-actions/setup-julia@v2
3524
with:
3625
version: ${{ matrix.version }}
37-
arch: ${{ matrix.arch }}
3826
- uses: julia-actions/cache@v1
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
3929
- uses: julia-actions/julia-buildpkg@v1
4030
- uses: julia-actions/julia-runtest@v1
31+
with:
32+
depwarn: error
4133
- uses: julia-actions/julia-processcoverage@v1
4234
- uses: codecov/codecov-action@v3
4335
with:
4436
files: lcov.info
45-
docs:
46-
name: Documentation
47-
runs-on: ubuntu-latest
48-
permissions:
49-
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
50-
contents: write
51-
statuses: write
52-
steps:
53-
- uses: actions/checkout@v4
54-
- uses: julia-actions/setup-julia@v2
55-
with:
56-
version: '1'
57-
- uses: julia-actions/cache@v1
58-
- name: Configure doc environment
59-
shell: julia --project=docs --color=yes {0}
60-
run: |
61-
using Pkg
62-
Pkg.develop(PackageSpec(path=pwd()))
63-
Pkg.instantiate()
64-
- uses: julia-actions/julia-buildpkg@v1
65-
- uses: julia-actions/julia-docdeploy@v1
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
- name: Run doctests
69-
shell: julia --project=docs --color=yes {0}
70-
run: |
71-
using Documenter: DocMeta, doctest
72-
using UDEComponents
73-
DocMeta.setdocmeta!(UDEComponents, :DocTestSetup, :(using UDEComponents); recursive=true)
74-
doctest(UDEComponents)

.github/workflows/CompatHelper.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
name: CompatHelper
2+
23
on:
34
schedule:
4-
- cron: 0 0 * * *
5+
- cron: '00 00 * * *'
56
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
612
jobs:
713
CompatHelper:
814
runs-on: ubuntu-latest
915
steps:
16+
- uses: julia-actions/setup-julia@v2
17+
with:
18+
version: 1.3
1019
- name: Pkg.add("CompatHelper")
1120
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
1221
- name: CompatHelper.main()
1322
env:
1423
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'
24+
run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs"])'

.github/workflows/Documentation.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: '*'
7+
pull_request:
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: julia-actions/setup-julia@v2
14+
with:
15+
version: '1'
16+
- name: Install dependencies
17+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
18+
- name: Build and deploy
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
21+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
22+
run: julia --project=docs/ docs/make.jl
23+
- uses: julia-actions/julia-processcoverage@v1
24+
with:
25+
directories: src
26+
- uses: codecov/codecov-action@v3
27+
with:
28+
files: lcov.info

.github/workflows/Downgrade.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Downgrade
22
on:
33
pull_request:
4-
branches:
5-
- main
64
paths-ignore:
75
- 'docs/**'
86
push:
@@ -12,20 +10,24 @@ on:
1210
- 'docs/**'
1311
jobs:
1412
test:
15-
runs-on: ubuntu-latest
13+
runs-on: ${{ matrix.os }}
1614
strategy:
15+
fail-fast: false
1716
matrix:
18-
version: ['1']
19-
group:
20-
- Core
17+
version:
18+
- '1'
19+
os:
20+
- ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v4
2323
- uses: julia-actions/setup-julia@v2
2424
with:
2525
version: ${{ matrix.version }}
2626
- uses: julia-actions/julia-downgrade-compat@v1
27-
# if: ${{ matrix.version == '1.6' }}
2827
with:
2928
skip: Pkg,TOML
29+
- uses: julia-actions/cache@v1
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
3032
- uses: julia-actions/julia-buildpkg@v1
3133
- uses: julia-actions/julia-runtest@v1

Project.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
1414

1515
[compat]
1616
Aqua = "0.8"
17-
ComponentArrays = "0.15"
17+
ComponentArrays = "0.15.11"
1818
ForwardDiff = "0.10.36"
1919
JET = "0.8"
2020
Lux = "0.5.32"
2121
LuxCore = "0.1.14"
22-
ModelingToolkit = "9.9.0"
22+
ModelingToolkit = "9.9"
2323
ModelingToolkitStandardLibrary = "2.6"
24-
Optimization = "3.22"
25-
OptimizationOptimisers = "0.2"
24+
Optimization = "3.24"
25+
OptimizationOptimisers = "0.2.1"
2626
OrdinaryDiffEq = "6.74"
27-
Random = "1"
27+
Random = "1.10"
2828
SafeTestsets = "0.1"
2929
SciMLStructures = "1.1.0"
3030
StableRNGs = "1"
3131
SymbolicIndexingInterface = "0.3.15"
3232
Symbolics = "5.27"
33-
Test = "1"
33+
Test = "1.10"
3434
julia = "1.10"
3535

3636
[extras]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://SciML.github.io/UDEComponents.jl/dev/)
55
[![Build Status](https://github.com/SciML/UDEComponents.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/SciML/UDEComponents.jl/actions/workflows/CI.yml?query=branch%3Amain)
66
[![Coverage](https://codecov.io/gh/SciML/UDEComponents.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/SciML/UDEComponents.jl)
7-
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
7+
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
88
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
99

1010
## Build UDEs with ModelingToolkit

src/UDEComponents.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ include("utils.jl")
1515
"""
1616
NeuralNetworkBlock(n_input = 1, n_output = 1;
1717
chain = multi_layer_feed_forward(n_input, n_output),
18-
rng = Xoshiro(0))
18+
rng = Xoshiro(0), eltype = Float64)
1919
2020
Create an `ODESystem` with a neural network inside.
2121
"""
2222
function NeuralNetworkBlock(n_input = 1,
2323
n_output = 1;
2424
chain = multi_layer_feed_forward(n_input, n_output),
25-
rng = Xoshiro(0), eltype=Float64)
25+
rng = Xoshiro(0), eltype = Float64)
2626
lux_p = Lux.initialparameters(rng, chain)
2727
ca = ComponentArray{eltype}(lux_p)
2828

test/lotka_volterra.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using StableRNGs
1414

1515
function lotka_ude()
1616
@variables t x(t)=3.1 y(t)=1.5
17-
@parameters α=1.3 [tunable=false] δ=1.8 [tunable=false]
17+
@parameters α=1.3 [tunable = false] δ=1.8 [tunable = false]
1818
Dt = ModelingToolkit.D_nounits
1919
@named nn_in = RealInput(nin = 2)
2020
@named nn_out = RealOutput(nout = 2)
@@ -115,7 +115,7 @@ res = solve(op, Adam(), maxiters = 5000)#, callback = plot_cb)
115115

116116
res_p = SciMLStructures.replace(Tunable(), prob.p, res)
117117
res_prob = remake(prob, p = res_p)
118-
res_sol = solve(res_prob, Rodas4(), saveat=sol_ref.t)
118+
res_sol = solve(res_prob, Rodas4(), saveat = sol_ref.t)
119119

120120
# using Plots
121121
# plot(sol_ref, idxs = [model_true.x, model_true.y])

0 commit comments

Comments
 (0)