-
Notifications
You must be signed in to change notification settings - Fork 23
128 lines (127 loc) · 3.43 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
name: CI
on:
workflow_dispatch:
pull_request:
types: [review_requested,reopened,synchronize]
pull_request_review:
types: [submitted,edited]
push:
branches:
- 'main'
tags: '*'
check_run:
types: [rerequested]
schedule:
- cron: '0 8 * * 1' # run the cron job one time per week on Monday 8:00 AM
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:
format:
name: Julia Formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- run: make lint
paper:
name: Paper Preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper/paper.pdf
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ contains(matrix.version, 'nightly') }}
needs: format
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1.9'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
USE_DEV: "false"
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
- name: Archive test artifacts
uses: actions/upload-artifact@v2
with:
name: test-output
path: test/_output
examples:
name: Examples
runs-on: ubuntu-latest
needs: format
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/cache@v3
id: examples
with:
path: |
docs/src/examples
docs/src/assets/examples
key: ${{ github.sha }}
- run: make examples
docs:
name: Documentation
runs-on: ubuntu-latest
needs:
- test
- format
- examples
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- uses: actions/cache@v3
id: examples
with:
path: |
docs/src/examples
docs/src/assets/examples
key: ${{ github.sha }}
- uses: julia-actions/julia-buildpkg@v1
- run: make docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}