Skip to content

Commit de1601c

Browse files
committed
ci files
1 parent 95ae10c commit de1601c

File tree

5 files changed

+171
-0
lines changed

5 files changed

+171
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily

.github/workflows/CompatHelper.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
# This repo uses Documenter, so we can reuse our [Documenter SSH key](https://documenter.juliadocs.org/stable/man/hosting/walkthrough/).
45+
# If we didn't have one of those setup, we could configure a dedicated ssh deploy key `COMPATHELPER_PRIV` following https://juliaregistries.github.io/CompatHelper.jl/dev/#Creating-SSH-Key.
46+
# Either way, we need an SSH key if we want the PRs that CompatHelper creates to be able to trigger CI workflows themselves.
47+
# That is because GITHUB_TOKEN's can't trigger other workflows (see https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow).
48+
# Check if you have a deploy key setup using these docs: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.
49+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
50+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/TagBot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: linux-macos-windows
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- 'lts' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
19+
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
20+
# - 'pre'
21+
os:
22+
- ubuntu-latest
23+
- windows-latest
24+
- macOS-13 # intel
25+
arch:
26+
- x64
27+
- aarch64
28+
exclude:
29+
- os: ubuntu-latest
30+
arch: aarch64
31+
- os: windows-latest
32+
arch: aarch64
33+
- os: macOS-13
34+
arch: aarch64
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: julia-actions/setup-julia@v2
38+
with:
39+
version: ${{ matrix.version }}
40+
arch: ${{ matrix.arch }}
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+
- uses: julia-actions/julia-buildpkg@v1
52+
- uses: julia-actions/julia-runtest@v1
53+
# env:
54+
# JULIA_NUM_THREADS: 4
55+
- uses: julia-actions/julia-processcoverage@v1
56+
- uses: codecov/codecov-action@v5
57+
docs:
58+
name: Documentation
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: julia-actions/setup-julia@v2
63+
with:
64+
version: '1'
65+
- run: |
66+
julia --project=docs -e '
67+
using Pkg
68+
Pkg.develop(PackageSpec(path=pwd()))
69+
Pkg.instantiate()'
70+
# - run: |
71+
# julia --project=docs -e '
72+
# using Documenter: doctest
73+
# using MYPACKAGE
74+
# doctest(MYPACKAGE)'
75+
- run: julia --project=docs docs/make.jl
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/pre-commit.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: code quality checks
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
pre-commit:
8+
name: run pre-commit
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: julia-actions/setup-julia@v2
13+
with:
14+
version: 1
15+
- run: |
16+
julia --project=@runic -e '
17+
using Pkg
18+
Pkg.add("Runic")'
19+
env:
20+
PYTHON: ""
21+
- uses: actions/setup-python@v5
22+
- uses: pre-commit/action@v3.0.1

0 commit comments

Comments
 (0)