-
Notifications
You must be signed in to change notification settings - Fork 125
81 lines (79 loc) · 2.45 KB
/
ci.yaml
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
name: Gazebo ros2 control CI
on:
pull_request:
push:
branches:
- master
- humble
jobs:
build:
runs-on: ubuntu-latest
container:
image: osrf/ros:rolling-desktop
steps:
- uses: actions/checkout@v4
- name: Setup colcon workspace
id: configure
run: |
cd ..
mkdir -p /home/ros2_ws/src
cp -r gazebo_ros2_control /home/ros2_ws/src/
apt-get update && apt-get upgrade -q -y
apt-get update && apt-get install -q -y --no-install-recommends \
dirmngr \
gnupg2 \
lsb-release \
python3-colcon-ros
cd /home/ros2_ws/src/
rosdep update
rosdep install --from-paths ./ -i -y --rosdistro rolling \
--ignore-src
- name: Build project
id: build
run: |
cd /home/ros2_ws/
. /opt/ros/rolling/local_setup.sh
colcon build --packages-up-to gazebo_ros2_control_demos
- name: Run tests
id: test
run: |
cd /home/ros2_ws/
. /opt/ros/rolling/local_setup.sh
colcon test --event-handlers console_direct+ --packages-select gazebo_ros2_control gazebo_ros2_control_demos
colcon test-result
build_testing:
runs-on: ubuntu-latest
container:
image: osrf/ros:rolling-desktop
steps:
- uses: actions/checkout@v4
- name: Setup colcon workspace
id: configure
run: |
cd ..
mkdir -p /home/ros2_ws/src
cp -r gazebo_ros2_control /home/ros2_ws/src/
sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2-testing/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
apt-get update && apt-get upgrade -q -y
apt-get update && apt-get install -q -y --no-install-recommends \
dirmngr \
gnupg2 \
lsb-release \
python3-colcon-ros
cd /home/ros2_ws/src/
rosdep update
rosdep install --from-paths ./ -i -y --rosdistro rolling \
--ignore-src
- name: Build project
id: build
run: |
cd /home/ros2_ws/
. /opt/ros/rolling/local_setup.sh
colcon build --packages-up-to gazebo_ros2_control_demos
- name: Run tests
id: test
run: |
cd /home/ros2_ws/
. /opt/ros/rolling/local_setup.sh
colcon test --event-handlers console_direct+ --packages-select gazebo_ros2_control gazebo_ros2_control_demos
colcon test-result