Skip to content

Commit 67350af

Browse files
committed
add workflows
1 parent 198f221 commit 67350af

File tree

13 files changed

+396
-0
lines changed

13 files changed

+396
-0
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/AutoAssign.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Auto assign issues and pull requests
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
pull_request:
8+
types:
9+
- opened
10+
11+
jobs:
12+
run:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
issues: write
16+
pull-requests: write
17+
steps:
18+
- name: Assign issues and pull requests
19+
uses: gustavofreze/auto-assign@1.1.4
20+
with:
21+
assignees: 'copilot-swe-agent'
22+
github_token: '${{ secrets.GITHUB_TOKEN }}'
23+
allow_self_assign: 'true'
24+
allow_no_assignees: 'true'
25+
assignment_options: 'ISSUE,PULL_REQUEST'

.github/workflows/CI.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
- 'main'
7+
- 'release-'
8+
tags: '*'
9+
pull_request:
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
test:
18+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
version:
24+
- '1.8' # lowest supported version
25+
- 'lts' # julia lts
26+
- '1' # latest stable 1.x release of Julia
27+
os:
28+
- ubuntu-latest
29+
- macOS-latest
30+
- windows-latest
31+
arch:
32+
- x64
33+
steps:
34+
- uses: actions/checkout@v6
35+
- uses: julia-actions/setup-julia@v2
36+
with:
37+
version: ${{ matrix.version }}
38+
arch: ${{ matrix.arch }}
39+
- uses: julia-actions/cache@v2
40+
- uses: julia-actions/julia-buildpkg@latest
41+
- uses: julia-actions/julia-runtest@latest
42+
env:
43+
JULIA_NUM_THREADS: 4
44+
- uses: julia-actions/julia-processcoverage@v1
45+
- uses: codecov/codecov-action@v5
46+
with:
47+
file: lcov.info
48+
test-nightly:
49+
needs: test
50+
name: Julia nightly - ${{ matrix.os }} - ${{ matrix.arch }}
51+
runs-on: ${{ matrix.os }}
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
version:
56+
- 'nightly'
57+
os:
58+
- ubuntu-latest
59+
- macOS-latest
60+
- windows-latest
61+
arch:
62+
- x64
63+
steps:
64+
- uses: actions/checkout@v6
65+
- uses: julia-actions/setup-julia@v2
66+
with:
67+
version: ${{ matrix.version }}
68+
arch: ${{ matrix.arch }}
69+
- uses: julia-actions/cache@v2
70+
- uses: julia-actions/julia-buildpkg@latest
71+
- uses: julia-actions/julia-runtest@latest
72+
continue-on-error: true
73+
env:
74+
JULIA_NUM_THREADS: 4

.github/workflows/CompatCheck.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Compat Check
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'main'
8+
- 'release-'
9+
tags: '*'
10+
pull_request:
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
name: Compat bounds check - ${{ matrix.julia-version }}
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
downgrade_mode: ['deps']
24+
# TODO: this should be ['1.10', '1'] but that is currently broken:
25+
# https://github.com/julia-actions/julia-downgrade-compat/issues/25
26+
julia-version: ['1.10', '1.12']
27+
steps:
28+
- uses: actions/checkout@v6
29+
- uses: julia-actions/setup-julia@v2
30+
with:
31+
version: ${{ matrix.julia-version }}
32+
- uses: julia-actions/julia-downgrade-compat@v2
33+
with:
34+
mode: ${{ matrix.downgrade_mode }}
35+
skip: Random, LinearAlgebra, Test, Combinatorics
36+
julia_version: ${{ matrix.julia-version }}
37+
- uses: julia-actions/julia-buildpkg@v1
38+
- uses: julia-actions/julia-runtest@v1

.github/workflows/CompatHelper.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Documentation
2+
3+
permissions:
4+
contents: write
5+
pages: write
6+
7+
on:
8+
push:
9+
branches:
10+
- 'master'
11+
- 'main'
12+
- 'release-'
13+
tags: '*'
14+
pull_request:
15+
16+
jobs:
17+
build:
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
matrix:
21+
version:
22+
- '1' # automatically expands to the latest stable 1.x release of Julia
23+
os:
24+
- ubuntu-latest
25+
arch:
26+
- x64
27+
steps:
28+
- uses: actions/checkout@v6
29+
- uses: julia-actions/setup-julia@latest
30+
with:
31+
version: ${{ matrix.version }}
32+
arch: ${{ matrix.arch }}
33+
- name: Install dependencies
34+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
35+
- name: Build and deploy
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
38+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
39+
run: julia --project=docs/ docs/make.jl
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
8+
concurrency:
9+
group: doc-preview-cleanup
10+
cancel-in-progress: false
11+
12+
jobs:
13+
doc-preview-cleanup:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout gh-pages branch
19+
uses: actions/checkout@v6
20+
with:
21+
ref: gh-pages
22+
- name: Delete preview and history + push changes
23+
run: |
24+
if [ -d "${preview_dir}" ]; then
25+
git config user.name "Documenter.jl"
26+
git config user.email "documenter@juliadocs.github.io"
27+
git rm -rf "${preview_dir}"
28+
git commit -m "delete preview"
29+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
30+
git push --force origin gh-pages-new:gh-pages
31+
fi
32+
env:
33+
preview_dir: previews/PR${{ github.event.number }}

.github/workflows/FormatCheck.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'Format'
2+
3+
on:
4+
pull_request_target:
5+
paths: ['**/*.jl']
6+
types: [opened, synchronize, reopened, ready_for_review]
7+
8+
permissions:
9+
contents: read
10+
actions: write
11+
pull-requests: write
12+
13+
jobs:
14+
formatcheck:
15+
uses: "ManyBodyLab/ManyBodyLabActions/.github/workflows/FormatCheck.yml@main"

.github/workflows/Register.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Register Package
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: Version to register or component to bump
7+
required: true
8+
jobs:
9+
register:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: julia-actions/RegisterAction@latest
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/TagBot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: TagBot
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
workflow_dispatch:
8+
inputs:
9+
lookback:
10+
default: 3
11+
12+
permissions:
13+
actions: read
14+
checks: read
15+
contents: write
16+
deployments: read
17+
issues: read
18+
discussions: read
19+
packages: read
20+
pages: read
21+
pull-requests: read
22+
repository-projects: read
23+
security-events: read
24+
statuses: read
25+
26+
jobs:
27+
TagBot:
28+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: JuliaRegistries/TagBot@v1
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
ssh: ${{ secrets.DOCUMENTER_KEY }}

0 commit comments

Comments
 (0)