forked from roboception/rc_genicam_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
146 lines (126 loc) · 2.94 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
before_script:
- export DISTRO_CODENAME=`lsb_release -cs` && echo Using distro $DISTRO_CODENAME
- apt-get update -yq && apt-get install -y lintian
#############
# Templates
#############
.amd64_template: &amd64_job # Hidden job that defines an anchor named 'amd64_job'
image: registry.roboception.de/tools/docker_images:buildimage
tags:
- amd64
- docker
.armhf_template: &armhf_job # Hidden job that defines an anchor named 'armhf_job'
image: registry.roboception.de/tools/docker_images:armhf-buildimage
tags:
- armhf
- docker
.amd64_xenial_template: &amd64_xenial_job
image: registry.roboception.de/tools/docker_images:xenial-buildimage
tags:
- amd64
- docker
.armhf_xenial_template: &armhf_xenial_job
image: registry.roboception.de/tools/docker_images:armhf-xenial-buildimage
tags:
- armhf
- docker
.test_t: &test
stage: test
script:
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
- make -j 4
- CTEST_OUTPUT_ON_FAILURE=1 make test
.package_testing_t: &package_testing
stage: deploy
environment:
name: testing/$DISTRO_CODENAME
variables:
TESTING_DEBS: "true"
script:
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
- make -j 4
- make package
- upload_deb.sh $DISTRO_CODENAME-testing *.deb
only:
- master
.package_stable_t: &package_stable
stage: deploy
environment:
name: stable/$DISTRO_CODENAME
script:
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
- make -j 4
- make package
- upload_deb.sh $DISTRO_CODENAME-stable *.deb
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+/
except:
- branches
##############
#### Jobs ####
##############
gen_dox:
<<: *amd64_job
variables:
TESTING_DEBS: "true"
stage: deploy
script:
- apt-get install -y doxygen ncftp
- mkdir build
- cd build
- cmake ..
- make doc
- upload_dox.sh doc/html
only:
- master
- tags
tags:
- docs
# Test (on every commit)
########################
test_amd64:
<<: *amd64_job
<<: *test
test_armhf:
<<: *armhf_job
<<: *test
test_xenial_amd64:
<<: *amd64_xenial_job
<<: *test
test_xenial_armhf:
<<: *armhf_xenial_job
<<: *test
# Deploy testing (only on master)
#################################
package_testing_amd64:
<<: *amd64_job
<<: *package_testing
package_testing_armhf:
<<: *armhf_job
<<: *package_testing
package_testing_xenial_amd64:
<<: *amd64_xenial_job
<<: *package_testing
package_testing_xenial_armhf:
<<: *armhf_xenial_job
<<: *package_testing
# Deploy stable (only for releases, version tags)
#################################################
package_stable_amd64:
<<: *amd64_job
<<: *package_stable
package_stable_armhf:
<<: *armhf_job
<<: *package_stable
package_stable_xenial_amd64:
<<: *amd64_xenial_job
<<: *package_stable
package_stable_xenial_armhf:
<<: *armhf_xenial_job
<<: *package_stable