forked from isciences/exactextract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
133 lines (114 loc) · 3.15 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
image: docker:latest
services:
- docker:dind
stages:
- test
- build
- release
variables:
CONTAINER_TEST_IMAGE: isciences/exactextract:$CI_COMMIT_REF_NAME
CONTAINER_RELEASE_IMAGE: isciences/exactextract:latest
.unittest_template: &unittest_definition
script:
- geos-config --version
- mkdir build-coverage
- cd build-coverage
- cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_CLI=NO -DBUILD_PYTHON=NO ..
- make -j2 catch_tests
- valgrind --leak-check=full --error-exitcode=1 ./catch_tests
after_script:
- cd build-coverage
- lcov --capture --directory CMakeFiles --output-file coverage.info
- bash <(curl -s https://codecov.io/bash)
test:geos35:
stage: test
image: isciences/exactextract-test-env:geos35
<<: *unittest_definition
test:geos36:
stage: test
image: isciences/exactextract-test-env:geos36
<<: *unittest_definition
test:geos37:
stage: test
image: isciences/exactextract-test-env:geos37
<<: *unittest_definition
test:geos38:
stage: test
image: isciences/exactextract-test-env:geos38
<<: *unittest_definition
test:geos39:
stage: test
image: isciences/exactextract-test-env:geos39
<<: *unittest_definition
test:geos310:
stage: test
image: isciences/exactextract-test-env:geos310
<<: *unittest_definition
test:geos311:
stage: test
image: isciences/exactextract-test-env:geos311
<<: *unittest_definition
test:geos312:
stage: test
image: isciences/exactextract-test-env:geos312
<<: *unittest_definition
test:cli:
stage: test
image: isciences/exactextract-test-env:geos312
script:
- geos-config --version
- mkdir build-coverage
- cd build-coverage
- cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_CLI=YES -DBUILD_PYTHON=NO ..
- make -j2 exactextract_bin subdivide
- pytest ../test
after_script:
- cd build-coverage
- lcov --capture --directory CMakeFiles --output-file coverage.info
- bash <(curl -s https://codecov.io/bash)
test:python:
stage: test
image: isciences/exactextract-test-env:geos312
script:
- apt-get install -y python3-dev pybind11-dev
- geos-config --version
- mkdir build-coverage
- cd build-coverage
- cmake -DCMAKE_BUILD_TYPE=Coverage -DBUILD_CLI=NO -DBUILD_PYTHON=YES ..
- cmake --build . -j2
- ctest -R pybindings --output-on-failure
after_script:
- cd build-coverage
- lcov --capture --directory CMakeFiles --output-file coverage.info
- bash <(curl -s https://codecov.io/bash)
build:
stage: build
script:
- docker login -u ci4isciences -p $DOCKERHUB_PW
- docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
only:
- master
pages:
stage: release
image: isciences/exactextract-build-env:latest
script:
- mkdir build-docs
- cd build-docs
- cmake -DBUILD_CLI=NO ..
- make doc_doxygen
- mv html ../public
artifacts:
paths:
- public
only:
- master
release-image:
stage: release
script:
- docker login -u ci4isciences -p $DOCKERHUB_PW
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
only:
- master