-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
108 lines (97 loc) · 2.45 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
stages:
- test
- docs
- deploy
variables:
JULIA_DEPOT_PATH: "$CI_PROJECT_DIR/.julia"
cache:
paths:
- $JULIA_DEPOT_PATH
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
before_script:
# workaround for https://github.com/JuliaDocs/Documenter.jl/issues/686
- apt-get -qq update; apt-get -y install git
- mkdir -p /root/.ssh && ssh-keyscan -H -t rsa git.km3net.de >> /root/.ssh/known_hosts
.script:
script:
- |
julia -e '
using Pkg
Pkg.update()
Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))'
julia --project=@. -e '
using Pkg
Pkg.instantiate()
Pkg.resolve()
Pkg.build()
Pkg.test(coverage=true)'
.coverage:
coverage: /Test coverage (\d+\.\d+%)/
after_script:
- |
julia -e '
using Pkg
Pkg.update()
Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))
Pkg.add("Coverage")
using Coverage
c, t = get_summary(process_folder())
using Printf
@printf "Test coverage %.2f%%\n" 100c / t'
Julia 1.8:
image: docker.km3net.de/base/julia:1.8
stage: test
extends:
- .script
- .coverage
Julia 1.9:
image: docker.km3net.de/base/julia:1.9
stage: test
extends:
- .script
- .coverage
Julia 1.10:
image: git.km3net.de:4567/common/dockerfiles/base/julia:1.10
stage: test
extends:
- .script
- .coverage
docs:
image: git.km3net.de:4567/common/dockerfiles/base/julia:1.10-tex
stage: docs
script:
- |
julia -e '
using Pkg
Pkg.update()
Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))'
- |
julia --project=docs -e '
using Pkg
Pkg.update()
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
Pkg.resolve()
using Documenter: doctest
using KM3io
doctest(KM3io)
include("docs/make.jl")'
# only:
# - main
# - tags
#register:
# image: docker.km3net.de/base/julia:1.8
# stage: deploy
# script:
# - |
# julia --project=. -e '
# using Pkg
# Pkg.update()
# Pkg.Registry.add(RegistrySpec(url = "https://git.km3net.de/common/julia-registry"))
# Pkg.add("LocalRegistry")
# using LocalRegistry
# register(KM3io; registry="KM3NeT", create_gitlab_mr=true)
# '
# only:
# variables:
# - $CI_COMMIT_TAG =~ /^v\d+.\d+.\d+-?.*$/