-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.gitlab-ci.yml
72 lines (65 loc) · 3.1 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
# General concept is strongly inspired by the industrial_ci project https://github.com/ros-industrial/industrial_ci
---
variables:
GIT_STRATEGY: clone
stages:
- build
.build_matrix:
parallel:
matrix:
- RUN_NAME: "22.04+1.4.3" # No effect on CI, just for making the gitlab pipeline view easier to read
CI_IMAGE: ros:humble-ros-core-jammy
IFM3D_PACKAGE_PATH: https://github.com/ifm/ifm3d/releases/download/v1.4.3/ifm3d-ubuntu-22.04-amd64-debs_1.4.3.tar
ROS_DISTRO: humble
- RUN_NAME: "22.04+1.5.0"
CI_IMAGE: ros:humble-ros-core-jammy
IFM3D_PACKAGE_PATH: https://github.com/ifm/ifm3d/releases/download/v1.5.0/ifm3d-ubuntu-22.04-amd64-debs_1.5.0.tar
ROS_DISTRO: humble
- RUN_NAME: "22.04+1.5.1"
CI_IMAGE: ros:humble-ros-core-jammy
IFM3D_PACKAGE_PATH: https://github.com/ifm/ifm3d/releases/download/v1.5.1/ifm3d-ubuntu-22.04-amd64-debs_1.5.1.tar
ROS_DISTRO: humble
- RUN_NAME: "22.04+1.5.2"
CI_IMAGE: ros:humble-ros-core-jammy
IFM3D_PACKAGE_PATH: https://github.com/ifm/ifm3d/releases/download/v1.5.2/ifm3d-ubuntu-22.04-amd64-debs_1.5.2.tar
ROS_DISTRO: humble
- RUN_NAME: "22.04+1.5.3"
CI_IMAGE: ros:humble-ros-core-jammy
IFM3D_PACKAGE_PATH: https://github.com/ifm/ifm3d/releases/download/v1.5.3/ifm3d-ubuntu-22.04-amd64-debs_1.5.3.tar
ROS_DISTRO: humble
- RUN_NAME: "24.04+1.5.3"
CI_IMAGE: ros:jazzy-ros-core-noble
IFM3D_PACKAGE_PATH: https://github.com/ifm/ifm3d/releases/download/v1.5.3/ifm3d-ubuntu-22.04-amd64-debs_1.5.3.tar
ROS_DISTRO: jazzy
build: # very short job name to keep the pipeline preview readable on Gitlab
stage: build
image: $CI_IMAGE
parallel: !reference [.build_matrix,parallel]
before_script:
# Download the released version ofifm3d from github
- apt-get update
- apt-get install -y curl
- curl --location $IFM3D_PACKAGE_PATH | tar x
# Install dependencies
- apt-get install -y libboost-all-dev git libcurl4-openssl-dev libgtest-dev libgoogle-glog-dev
libxmlrpc-c++8-dev libopencv-dev libpcl-dev libproj-dev python3-dev python3-pip build-essential
coreutils findutils cmake locales ninja-build
# Install ifm3d packages
- dpkg -i ./ifm3d_*.deb
# Cleanup
- rm ifm3d_*.deb
script:
# Install some dependencies, update rosdep
- apt-get update
- apt-get install -y ros-dev-tools
- rosdep init || true # init needed for 22.04 image but throws error on 24.04; error can be ignored
- rosdep update > /dev/null
# Create Workspace and copy sources
- mkdir -p /root/target_ws/src
- cp -r . /root/target_ws/src
- cd /root/target_ws/
# Install dependencies, build workspace and run tests
- source /opt/ros/$ROS_DISTRO/setup.bash
- rosdep install --from-paths /root/target_ws/src --ignore-src -y
- colcon build --event-handlers desktop_notification- status- terminal_title- --cmake-args -DENABLE_COVERAGE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- colcon test --event-handlers desktop_notification- status- terminal_title- console_cohesion+ --executor sequential --ctest-args -j1