-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.54 KB
/
ros2_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
name: ROS2 CI
on:
push:
branches: [ main, unittest ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: osrf/ros:humble-desktop
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y curl gnupg lsb-release
- name: Import ROS2 apt key
run: |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | sudo apt-key add -
- name: Setup sources.list
run: |
sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
- name: Install ROS2 Humble dependencies
run: |
sudo apt update
sudo apt install -y python3-colcon-common-extensions python3-rosdep python3-vcstool
- name: Initialize rosdep
run: |
if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then
sudo rosdep init
fi
rosdep update
- name: Install package dependencies
run: |
cd robile_safety
rosdep install --from-paths . --ignore-src --rosdistro humble -y
- name: Build the package
run: |
cd robile_safety
source /opt/ros/humble/setup.bash
colcon build --symlink-install
shell: bash
- name: Run unittest tests
run: |
cd robile_safety
python3 -m unittest discover test
shell: bash