-
Notifications
You must be signed in to change notification settings - Fork 14
148 lines (148 loc) · 4.75 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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
tags: '*'
defaults:
run:
shell: bash
jobs:
finalize:
timeout-minutes: 10
needs: [coverage, nocoverage, docs, doctests]
if: always()
runs-on: ubuntu-latest
steps:
- run: |
echo coverage: ${{ needs.coverage.result }}
echo nocoverage: ${{ needs.nocoverage.result }}
echo docs: ${{ needs.docs.result }}
echo doctests: ${{ needs.doctests.result }}
- run: exit 1
if: |
(needs.coverage.result != 'success') ||
(needs.nocoverage.result != 'success') ||
(needs.docs.result != 'success') ||
(needs.doctests.result != 'success')
coverage:
name: coverage=true/Julia ${{ matrix.version }}/${{ matrix.threads }} threads/${{ matrix.os }}/${{ matrix.arch }}/${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
arch:
- x64
os:
- ubuntu-latest
version:
- '1'
threads:
- '3'
- '4'
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: julia-actions/setup-julia@f40c4b69330df1d22e7590c12e76dc2f9c66e0bc
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
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@72ddd0fcdc760e6d2ef7ef2bbb11ae5032b671a8
- uses: julia-actions/julia-runtest@79a7e100883947123f8263c5f06e6c0ea3eb972f
with:
coverage: true
env:
JULIA_NUM_THREADS: ${{ matrix.threads }}
JULIA_CPU_THREADS: ${{ matrix.threads }}
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
file: lcov.info
nocoverage:
name: coverage=false/Julia ${{ matrix.version }}/${{ matrix.os }}/${{ matrix.arch }}/${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
arch:
- x64
os:
- ubuntu-latest
version:
- '1.6'
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: julia-actions/setup-julia@f40c4b69330df1d22e7590c12e76dc2f9c66e0bc
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
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@72ddd0fcdc760e6d2ef7ef2bbb11ae5032b671a8
- uses: julia-actions/julia-runtest@79a7e100883947123f8263c5f06e6c0ea3eb972f
with:
coverage: false
env:
JULIA_NUM_THREADS: 2
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: julia-actions/setup-julia@f40c4b69330df1d22e7590c12e76dc2f9c66e0bc
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
env:
JULIA_PKG_SERVER: ""
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
JULIA_PKG_SERVER: ""
doctests:
name: Doctests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: julia-actions/setup-julia@f40c4b69330df1d22e7590c12e76dc2f9c66e0bc
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
env:
JULIA_PKG_SERVER: ""
- run: |
julia --project=docs -e '
using Documenter: doctest
using SimpleChains
doctest(SimpleChains)'
env:
JULIA_PKG_SERVER: ""