-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
137 lines (115 loc) · 2.8 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
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -yq && apt-get install -y curl lsb-release lintian
- export DISTRO_CODENAME=`lsb_release -cs` && echo Using distro $DISTRO_CODENAME
- echo Using ROS_DISTRO $ROS_DISTRO
- rosdep install --from-paths . --ignore-src -r -y
- export CMAKE_PREFIX_PATH="/opt/ros/$ROS_DISTRO"
variables:
GET_SOURCES_ATTEMPTS: "3"
GIT_DEPTH: "0"
#########################
# Templates using anchors
#########################
.amd64_dashing_t: &amd64_dashing_job
image: ros:dashing-ros-base-bionic
tags:
- amd64
- docker
.armhf_dashing_t: &armhf_dashing_job
image: ros:dashing-ros-base-bionic
tags:
- armhf
- docker
.amd64_eloquent_t: &amd64_eloquent_job
image: ros:eloquent-ros-base-bionic
tags:
- amd64
- docker
.amd64_foxy_t: &amd64_foxy_job
image: ros:foxy-ros-base-focal
tags:
- amd64
- docker
#############
# Templates
#############
.test:
stage: test
script:
- mkdir build && cd build
- cmake ..
- make -j 4
- CTEST_OUTPUT_ON_FAILURE=1 make test
# Debian packaging
.package:
stage: deploy
script:
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX="/opt/ros/$ROS_DISTRO" -DCMAKE_BUILD_TYPE=Release ..
- make -j 4
- make package
- if [ -z "$APT_REPO" ]; then export APT_REPO=testing; fi
- upload_deb.sh $DISTRO_CODENAME-$APT_REPO *.deb
.package_testing:
extends: .package
only:
- master
except:
- tags
variables:
TESTING_DEBS: "true"
APT_REPO: "testing"
.package_stable:
extends: .package
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+/
except:
- branches
variables:
APT_REPO: "stable"
##############
#### Jobs ####
##############
# Test (on every commit)
########################
test:dashing:amd64:
<<: *amd64_dashing_job
extends: .test
test:dashing:armhf:
<<: *armhf_dashing_job
extends: .test
test:eloquent:amd64:
<<: *amd64_eloquent_job
extends: .test
test:foxy:amd64:
<<: *amd64_foxy_job
extends: .test
# Deploy testing (only on master)
#################################
package_testing:dashing:amd64:
<<: *amd64_dashing_job
extends: .package_testing
package_testing:dashing:armhf:
<<: *armhf_dashing_job
extends: .package_testing
package_testing:eloquent:amd64:
<<: *amd64_eloquent_job
extends: .package_testing
package_testing:foxy:amd64:
<<: *amd64_foxy_job
extends: .package_testing
# Deploy stable (only for releases, version tags)
#################################################
package_stable:dashing:amd64:
<<: *amd64_dashing_job
extends: .package_stable
package_stable:dashing:armhf:
<<: *armhf_dashing_job
extends: .package_stable
package_stable:eloquent:amd64:
<<: *amd64_eloquent_job
extends: .package_stable
package_stable:foxy:amd64:
<<: *amd64_foxy_job
extends: .package_stable