-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.47 KB
/
ros-packaging.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
name: ROS 2 CI
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
ROS_DISTRO: humble
ROS_WS: /home/runner/work/ros2_ws/ros2_ws
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up ROS 2
run: |
sudo apt-get update
sudo apt-get install -y curl gnupg lsb-release
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y \
ros-${{ env.ROS_DISTRO }}-desktop \
python3-colcon-common-extensions \
python3-rosdep \
python3-vcstool \
build-essential \
cmake
- name: Install dependencies
run: |
sudo rosdep init
rosdep update
mkdir -p $ROS_WS/src
cp -r $GITHUB_WORKSPACE/* $ROS_WS/src
cd $ROS_WS
rosdep install --from-paths src --ignore-src -r -y
- name: Build packages
run: |
cd $ROS_WS
source /opt/ros/${{ env.ROS_DISTRO }}/setup.sh
colcon build --event-handlers console_cohesion+
- name: Run tests
run: |
cd $ROS_WS
source install/setup.sh
colcon test --event-handlers console_cohesion+
colcon test-result --verbose