-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
99 lines (96 loc) · 2.37 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
before_script:
- which git || (apt-get update -qq && apt-get install --no-install-recommends -qqqy git)
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "[email protected]:"
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "https://gitlab.com/" --add
- |
julia -e '
using Pkg
Pkg.Registry.add(
RegistrySpec(url = "https://github.com/JuliaRegistries/General.git")
)
Pkg.Registry.add(
RegistrySpec(url = "https://github.com/tensor4all/tensors4fieldsregistry.git")
)'
variables:
CI_JULIA_CACHE_DIR: ${CI_PROJECT_DIR}/julia_pkg
JULIA_DEPOT_PATH: ${CI_JULIA_CACHE_DIR}
cache:
key:
files:
- Project.toml
- docs/Project.toml
prefix: ${CI_JOB_NAME}
paths:
- ${CI_JULIA_CACHE_DIR}
.script:
script:
- |
julia --project=@. -e '
using Pkg
Pkg.build()
Pkg.test(coverage=true)'
.coverage:
coverage: /Test coverage (\d+\.\d+%)/
after_script:
- |
julia -e '
using Pkg
Pkg.add("Coverage")
using Coverage
c, t = get_summary(process_folder())
using Printf
@printf "Test coverage %.2f%%\n" 100c / t'
Julia test:
image: julia:${JULIA_VERSION}
extends:
- .script
- .coverage
parallel:
matrix:
- JULIA_VERSION:
- "1.9"
- "1" # latest stable version
.doctest:
script:
- |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
using Documenter: doctest
using QuanticsTCI
doctest(QuanticsTCI)
include("docs/make.jl")'
doctest:
image: julia:1.9
extends:
- .doctest
pages:
image: julia:1.9
stage: deploy
extends:
- .doctest
after_script:
- mkdir -p public
- mv docs/build public/dev
artifacts:
paths:
- public
only:
- main
CompatHelper:
image: julia:1 # Set to the Julia version you want to use
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
script:
- |
julia --color=yes -e "
import Pkg;
name = \"CompatHelper\";
uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\";
version = \"3\";
Pkg.add(; name, uuid, version)"
- |
julia --color=yes -e "
import CompatHelper;
CompatHelper.main(;use_existing_registries=true)"