-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
64 lines (56 loc) · 1.81 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
# Install required NTFk, Ipopt && Mads tools
before_script:
- apt-get update
- apt-get install -y wget git gcc gfortran g++ make patch bzip2 hdf5-tools zlib1g-dev
stages:
- test
- postprocess
variables:
JULIA_PKGDIR: "$CI_PROJECT_DIR/"
package: 'NTFk'
# Define a testing template to use against various images
.test_template: &test_definition
script:
# These private packages need special handling.
# Perhaps there's a more elegant way?
- julia -e "Pkg.init();
Pkg.clone(\"https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.com/TensorFactorization/NMFk.jl.git\");
Pkg.clone(\"https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.com/TensorFactorization/TensorDecompositions.jl.git\");
Pkg.clone(\"https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.com/TensorFactorization/CanDecomp.jl.git\")"
# Issues with PyPlot below. See Pull Request details.
- julia -e "Pkg.clone(\"https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.com/TensorFactorization/NTFk.jl.git\");
ENV[\"PYTHON\"]=\"\";
Pkg.build(\"PyCall\");
using PyPlot;
Pkg.resolve();
Pkg.test(\"$package\",coverage = true)"
# Keep coverage files for postprocess stage
artifacts:
paths:
- $JULIA_PKGDIR/METADATA
- $JULIA_PKGDIR/$package
#- src/*.cov
# Run test on stable image
test:1.4.2:
stage: test
image: julia:1.4.2
<<: *test_definition
# Run test on development image
# test:dev:
# stage: test
# image: julia:latest
# allow_failure: true
# <<: *test_definition
# Get code coverage and optionally push
coverage:
stage: postprocess
allow_failure: true
image: julia:1.4.2
dependencies:
- test:1.4.2
script:
- julia -e 'Pkg.add("Coverage");'
- julia -e "using Coverage;
cl, tl = get_summary(process_folder());
println(\"(\", cl/tl*100, \"%) covered\")"
coverage: '/\(\d+.\d+\%\) covered/'