-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
89 lines (83 loc) · 2.23 KB
/
.gitlab-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
# Store packages locally to allow caching.
variables:
JULIA_DEPOT_PATH: ${CI_PROJECT_DIR}/.julia
JULIA_NUM_THREADS: 2
.matrix:
parallel:
matrix:
- IMAGE:
- julia:1.6
- julia:1.7
- julia:1.8
- julia:1.9
- julia:1.10
image: $IMAGE
# Cache packages per job (i.e. Julia version) and project specification.
# Do not cache Manifest.toml so that Julia still uses the most recent packages.
cache:
key:
prefix: ${CI_JOB_NAME}-${CI_JOB_IMAGE}
files:
- Project.toml
paths:
- .julia/packages
- .julia/compiled
test:
interruptible: true
extends:
- .matrix
script:
- julia -e 'using InteractiveUtils; versioninfo()'
- julia --project -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
coverage: /Test coverage (\d+\.\d+%)/
after_script:
- |
julia -e '
using Pkg
Pkg.add("Coverage")
using Coverage, Printf
c, t = get_summary(process_folder())
@printf "Test coverage %.2f%%\n" 100c/t'
# TODO: test using 1.6 once these are resolved:
# https://github.com/JuliaIO/MAT.jl/issues/179
# https://github.com/JuliaIO/TranscodingStreams.jl/issues/131
demo:
interruptible: true
image: julia:1.7
variables:
DATADEPS_ALWAYS_ACCEPT: 1
JULIA_PROJECT: "@."
script:
- cd demo
- julia -e 'import Pkg; Pkg.instantiate(); Pkg.develop(path="..")'
- julia counting.jl
- julia riccati.jl
docs:
interruptible: true
extends:
- .matrix
script:
- cd docs
- julia --project -e 'import Pkg; Pkg.instantiate(); Pkg.develop(path="..")'
- julia --project make.jl
artifacts:
paths:
- docs/build
expire_in: 7 days
# Test that the benchmark script isn't broken.
benchmark:
interruptible: true
image: julia:1.6
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH =~ /^bench/'
script:
- cd bench
- julia --project -e 'using Pkg; Pkg.instantiate()'
- echo 'run, t_load, t_solve' > startup.csv
- julia --project startup-double.jl >> startup.csv
- julia --project -e "using Test, DelimitedFiles; m = readdlm(\"startup.csv\", ','); @test size(m) == (3,3)"
artifacts:
paths:
- bench/startup.csv
expire_in: 7 days