-
Notifications
You must be signed in to change notification settings - Fork 3
154 lines (147 loc) · 4.6 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: CI
on:
push:
branches:
- main
tags: ["*"]
pull_request:
schedule:
- cron: '0 0 * * 1' # runs 00:00 UTC on every Monday
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: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.6"
- "1.8"
- "1.9"
- "nightly"
os:
- ubuntu-latest
include:
- os: windows-latest
version: "1"
- os: macos-latest
version: "1"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: actions/cache@v4
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
- name: Run live tests
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
shell: julia --color=yes --project {0}
run: |
import Pkg
Pkg.test(test_args=["--live"], coverage=true)
env:
JULIAHUB_SERVER: ${{ secrets.JULIAHUB_SERVER }}
JULIAHUB_TOKEN: ${{ secrets.JULIAHUB_TOKEN }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
aqua:
name: Aqua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: "Aqua.test_all(JuliaHub)"
shell: julia --color=yes {0}
run: |
import Pkg
Pkg.activate(temp=true)
Pkg.add(name="Aqua", version="0.8")
Pkg.develop(path=".")
include(joinpath(pwd(), "test", "aqua.jl"))
jet:
name: JET
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: "Install dependencies"
shell: julia --color=yes {0}
run: |
import Pkg
Pkg.activate("juliahub-jet", shared=true)
Pkg.add(name="JET", version="0.9")
Pkg.develop(path=".")
- name: "JET.test_package(..., mode=:basic) [informational]"
run: julia --color=yes --project=@juliahub-jet test/jet.jl
env:
JULIAHUB_TEST_JET: basic
continue-on-error: true
- name: "JET.test_package() w/ custom filtering"
run: julia --color=yes --project=@juliahub-jet test/jet.jl
env:
JULIAHUB_TEST_JET: custom-filtering
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
pull-requests: read # Required when using `push_preview=true`
statuses: write # Optional, used to report documentation build statuses
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/julia-buildpkg@v1
- name: Set up documentation environment
run: make docs-manifest
- name: Build & deploy the documentation
run: make docs
env:
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
doctest:
name: Doctest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1.9"
- uses: julia-actions/julia-buildpkg@v1
- name: Set up documentation environment
run: |
using Pkg
Pkg.develop(path=".")
Pkg.instantiate()
shell: julia --color=yes --project=docs/ {0}
- name: Check doctests
run: julia --color=yes --project=docs/ --code-coverage docs/make.jl --doctest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info