-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.gitlab-ci.yml
76 lines (70 loc) · 2.72 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
cache:
untracked: true
paths:
- vendor/
- vendor/apt
- vendor/julia
# Below is the template to run your tests in Julia
.test_template: &test_11
before_script:
- mkdir -p vendor/apt
- mkdir -p vendor/julia
- apt-get update -yqq
- apt-get update -qq && apt-get -o dir::cache::archives="vendor/apt" install -y -qq wget git gcc gfortran liblapack-dev libgmp-dev libglpk-dev cmake g++ build-essential pkg-config
- mkdir -p /root/.julia/v1.1
- cp -r vendor/julia/. /root/.julia/v1.1/
- ls -a /root/.julia/v1.1/
- rm -f /root/.julia/v1.1/.cache
- ls -a /root/.julia/v1.1/
script:
# Let's run the tests. Substitute `coverage = false` below, if you do not
# want coverage results.
- julia -e 'using Pkg; Pkg.update();'
- julia -e 'using Pkg; if "Juniper" in keys(Pkg.installed()) Pkg.rm("Juniper"); Pkg.rm("Juniper") end'
- julia -e 'using Pkg; Pkg.clone(pwd());'
- ls -a /root/.julia/v1.1/
- julia -e 'using Pkg; Pkg.add("Ipopt")'
- julia -e 'using Pkg; Pkg.test("Juniper",
coverage = true)'
# Comment out below if you do not want coverage results.
- julia -e 'using Pkg; Pkg.add("Coverage"); cd(Pkg.dir("Juniper"));
using Coverage; cl, tl = get_summary(process_folder());
println("(", cl/tl*100, "%) covered")'
- pwd
- ls -a
- cp -r /root/.julia/v1.1/. vendor/julia/
# Below is the template to run your tests in Julia
.test_template: &test_10
before_script:
- mkdir -p vendor/apt
- mkdir -p vendor/julia
- apt-get update -yqq
- apt-get update -qq && apt-get -o dir::cache::archives="vendor/apt" install -y -qq wget git gcc gfortran liblapack-dev libgmp-dev libglpk-dev cmake g++ build-essential pkg-config
- mkdir -p /root/.julia/v1.1
- cp -r vendor/julia/. /root/.julia/v1.1/
- ls -a /root/.julia/v1.1/
- rm -f /root/.julia/v1.1/.cache
- ls -a /root/.julia/v1.1/
script:
# Let's run the tests. Substitute `coverage = false` below, if you do not
# want coverage results.
- julia -e 'using Pkg; Pkg.update();'
- julia -e 'using Pkg; if "Juniper" in keys(Pkg.installed()) Pkg.rm("Juniper"); Pkg.rm("Juniper") end'
- julia -e 'using Pkg; Pkg.clone(pwd());'
- ls -a /root/.julia/v1.1/
- julia -e 'using Pkg; Pkg.add("Ipopt")'
- julia -e 'using Pkg; Pkg.test("Juniper",
coverage = true)'
# Comment out below if you do not want coverage results.
- julia -e 'using Pkg; Pkg.add("Coverage"); cd(Pkg.dir("Juniper"));
using Coverage; cl, tl = get_summary(process_folder());
println("(", cl/tl*100, "%) covered")'
- pwd
- ls -a
- cp -r /root/.julia/v1.1/. vendor/julia/
test:1.1.0:
image: julia:1.1.0
<<: *test_11
test:1.0.1:
image: julia:1.0.1
<<: *test_10