forked from oscar-system/GAP.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (135 loc) · 4.58 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
name: CI
on:
- push
- pull_request
jobs:
test:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
strategy:
fail-fast: false
matrix:
julia-version:
- '1.3'
- '1.4'
- '1.5'
- '1.6'
- '~1.7.0-0'
- 'nightly'
julia-arch:
- x64
os:
- ubuntu-latest
- macOS-latest
exclude:
# Reduce the number of macOS jobs, as fewer can be run in parallel
- os: macos-latest
julia-version: '1.3'
- os: macos-latest
julia-version: '1.4'
steps:
- uses: actions/checkout@v2
with:
# For Codecov, we must also fetch the parent of the HEAD commit to
# be able to properly deal with PRs / merges
fetch-depth: 2
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- name: Cache artifacts
uses: actions/cache@v1
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 }}-
- name: "Build package"
uses: julia-actions/julia-buildpkg@latest
- name: "Run tests"
uses: julia-actions/julia-runtest@latest
- name: "Add optional Julia dependencies for GAP tests"
run: julia --color=yes -e 'using Pkg ; Pkg.add(["Singular", "Nemo"])'
- name: "GAP tests"
run: |
gap_sh=$(julia --project=. -e 'import GAP; print(GAP.gap_exe())');
export GAP="$gap_sh -A --quitonbreak --norepl"
etc/ci_test.sh
- name: "Process Julia code coverage"
uses: julia-actions/julia-processcoverage@v1
- name: "Process GAP code coverage"
run: |
julia --color=yes --project=. -e '
using GAP
GAP.Packages.install("profiling", interactive = false) || exit(1)
'
gap_sh=$(julia --project=. -e 'import GAP; print(GAP.gap_exe())');
$gap_sh -A --quitonbreak --norepl etc/gather_coverage.g
cat gap-lcov.info >> lcov.info
- name: "Upload coverage data to Codecov"
continue-on-error: true
uses: codecov/codecov-action@v1
- name: "Upload coverage data to Coveralls"
continue-on-error: true
uses: coverallsapp/github-action@master
with:
path-to-lcov: lcov.info
github-token: ${{ secrets.github_token }}
flag-name: ${{ matrix.name }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: "Finish Coveralls coverage upload"
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
docs:
name: "Documentation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/cache@v1
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@latest
- name: "Install package"
run: |
julia --project=docs --color=yes -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: "Run doctests"
run: |
julia --project=docs --color=yes test/doctest.jl
- name: "Build GAP manual"
run: |
gap_sh=$(julia --project=. -e 'import GAP; print(GAP.gap_exe())');
cd pkg/JuliaInterface
$gap_sh -A --quitonbreak --norepl makedoc.g
cd ../..
mkdir -p docs/src/assets/html/JuliaInterface/
cp pkg/JuliaInterface/doc/*.{html,css,js} docs/src/assets/html/JuliaInterface/
- name: "Deploy documentation"
run: julia --project=docs --color=yes docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}