This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0ae62b7
Showing
23 changed files
with
712 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
style = "sciml" | ||
whitespace_in_kwargs = false | ||
always_use_return = true | ||
margin = 92 | ||
indent = 4 | ||
format_docstrings = true | ||
join_lines_based_on_source = false | ||
separate_kwargs_with_semicolon = true | ||
always_for_in = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
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: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- "1" | ||
- "1.6" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.version }} | ||
- uses: actions/cache@v3 | ||
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 }}- | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
with: | ||
directories: src,ext | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: CompatHelper | ||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
CompatHelper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if Julia is already available in the PATH | ||
id: julia_in_path | ||
run: which julia | ||
continue-on-error: true | ||
- name: Install Julia, but only if it is not already available in the PATH | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: '1' | ||
arch: ${{ runner.arch }} | ||
if: steps.julia_in_path.outcome != 'success' | ||
- name: "Add the General registry via Git" | ||
run: | | ||
import Pkg | ||
ENV["JULIA_PKG_SERVER"] = "" | ||
Pkg.Registry.add("General") | ||
shell: julia --color=yes {0} | ||
- name: "Install CompatHelper" | ||
run: | | ||
import Pkg | ||
name = "CompatHelper" | ||
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" | ||
version = "3" | ||
Pkg.add(; name, uuid, version) | ||
shell: julia --color=yes {0} | ||
- name: "Run CompatHelper" | ||
run: | | ||
import CompatHelper | ||
CompatHelper.main() | ||
shell: julia --color=yes {0} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: ["*"] | ||
pull_request: | ||
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: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- uses: actions/cache@v3 | ||
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 documentation dependencies | ||
run: julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' | ||
- name: Build and deploy | ||
run: julia --code-coverage=user --project=docs/ --color=yes docs/make.jl | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key | ||
GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 | ||
JULIA_DEBUG: "Documenter" | ||
DATADEPS_ALWAYS_ACCEPT: true | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
with: | ||
directories: src | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Downstream | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
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: | ||
name: ${{ matrix.package.repo }}/${{ matrix.package.group }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
GROUP: ${{ matrix.package.group }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
julia-version: ["1"] | ||
os: [ubuntu-latest] | ||
package: | ||
- { user: LuxDL, repo: Lux.jl, group: All } | ||
- { user: LuxDL, repo: Boltz.jl, group: All } | ||
if: contains(github.event.pull_request.labels.*.name, 'run downstream test') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
arch: x64 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- name: Clone Downstream | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} | ||
path: downstream | ||
- name: Load this and run the downstream tests | ||
shell: julia --code-coverage=user --color=yes --project=downstream {0} | ||
run: | | ||
using Pkg | ||
try | ||
# force it to use this PR's version of the package | ||
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps | ||
Pkg.update() | ||
Pkg.test() # resolver may fail with test time deps | ||
catch err | ||
err isa Pkg.Resolve.ResolverError || rethrow() | ||
# If we can't resolve that means this is incompatible by SemVer and this is fine | ||
# It means we marked this as a breaking change, so we don't need to worry about | ||
# Mistakenly introducing a breaking change, as we have intentionally made one | ||
@info "Not compatible with this release. No problem." exception=err | ||
exit(0) # Exit immediately, as a success | ||
end | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
with: | ||
directories: src,ext | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: FormatCheck | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'release-' | ||
tags: ['*'] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: ["1"] | ||
julia-arch: [x86] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Install JuliaFormatter and format | ||
run: | | ||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | ||
julia -e 'using JuliaFormatter; format(".", verbose=true)' | ||
- name: Format check | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "Some files have not been formatted !!!" | ||
write(stdout, out) | ||
exit(1) | ||
end' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: FormatPR | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install JuliaFormatter and format | ||
run: | | ||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | ||
julia -e 'using JuliaFormatter; format(".")' | ||
# https://github.com/marketplace/actions/create-pull-request | ||
# https://github.com/peter-evans/create-pull-request#reference-example | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Format .jl files | ||
title: 'Automatic JuliaFormatter.jl run' | ||
branch: auto-juliaformatter-pr | ||
delete-branch: true | ||
labels: formatting, automated pr, no changelog | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Invalidations | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: always. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
evaluate: | ||
# Only run on PRs to the default branch. | ||
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch | ||
if: github.base_ref == github.event.repository.default_branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- uses: actions/checkout@v3 | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-invalidations@v1 | ||
id: invs_pr | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.repository.default_branch }} | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-invalidations@v1 | ||
id: invs_default | ||
|
||
- name: Report invalidation counts | ||
run: | | ||
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY | ||
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY | ||
- name: Check if the PR does increase number of invalidations | ||
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: TagBot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
inputs: | ||
lookback: | ||
default: "3" | ||
permissions: | ||
actions: read | ||
checks: read | ||
contents: write | ||
deployments: read | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
pull-requests: read | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Manifest.toml | ||
generated | ||
build | ||
.vscode | ||
wip | ||
model_weights | ||
|
||
docs/docs | ||
docs/site | ||
|
||
scripts | ||
test_ext |
Oops, something went wrong.