-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
85 lines (73 loc) · 2.29 KB
/
azure-pipelines.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
trigger:
- main
pr:
- main
variables:
- name: BRANCH_NAME
value: $(Build.SourceBranchName)
resources:
containers:
- container: ubuntu_20_04_ros2_foxy
image: ros:foxy-ros-base
options: '-u root:sudo'
- container: ubuntu_22_04_ros2_humble
image: ros:humble-ros-base
options: '-u root:sudo'
- container: ubuntu_22_04_ros2_rolling
image: ros:rolling-ros-base
options: '-u root:sudo'
strategy:
matrix:
ubuntu_20_04_foxy:
buildContainer: ubuntu_20_04_ros2_foxy
ubuntu_22_04_humble:
buildContainer: ubuntu_22_04_ros2_humble
ubuntu_22_04_rolling:
buildContainer: ubuntu_22_04_ros2_rolling
container: $[ variables ['buildContainer'] ]
steps:
- script: ./CI/dependencies_setup.sh
displayName: 'Dependencies Setup'
- script: |
#!/bin/bash
rm -rf ToF
git clone https://github.com/analogdevicesinc/ToF
cd ToF
mkdir build
cd build
sudo cmake -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -DWITH_EXAMPLES=off -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" ..
sudo make install .
displayName: 'ToF Build'
- script: |
#!/bin/bash
rm -rf ros2_ws
mkdir -p ros2_ws/src
cd ros2_ws/src
git clone -b ${{ variables.BRANCH_NAME }} https://github.com/analogdevicesinc/tof-ros2
cd ../
source /opt/ros/foxy/setup.sh
colcon build
condition: eq( variables['buildContainer'], 'ubuntu_20_04_ros2_foxy' )
displayName: 'ros2_foxy'
- script: |
#!/bin/bash
rm -rf ros2_ws
mkdir -p ros2_ws/src
cd ros2_ws/src
git clone -b ${{ variables.BRANCH_NAME }} https://github.com/analogdevicesinc/tof-ros2
cd ../
source /opt/ros/humble/setup.sh
colcon build
condition: eq( variables['buildContainer'], 'ubuntu_22_04_ros2_humble' )
displayName: 'ros2_humble'
- script: |
#!/bin/bash
rm -rf ros2_ws
mkdir -p ros2_ws/src
cd ros2_ws/src
git clone -b ${{ variables.BRANCH_NAME }} https://github.com/analogdevicesinc/tof-ros2
cd ../
source /opt/ros/rolling/setup.sh
colcon build --cmake-args -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9
condition: eq( variables['buildContainer'], 'ubuntu_22_04_ros2_rolling' )
displayName: 'ros2_rolling'