Skip to content

Commit 733eb04

Browse files
committed
Added CI
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
1 parent e57f3e8 commit 733eb04

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set -ev
3+
4+
# Configuration.
5+
export COLCON_WS=~/ws
6+
export COLCON_WS_SRC=${COLCON_WS}/src
7+
export DEBIAN_FRONTEND=noninteractive
8+
export ROS_PYTHON_VERSION=3
9+
10+
apt update -qq
11+
apt install -qq -y lsb-release wget curl build-essential
12+
13+
# Dependencies.
14+
echo "deb http://packages.ros.org/ros2-testing/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-testing.list
15+
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
16+
apt-get update -qq
17+
apt-get install -y python3-colcon-common-extensions \
18+
python3-rosdep python3-vcstool python3-vcstools
19+
20+
rosdep init
21+
rosdep update
22+
23+
# Build.
24+
mkdir -p $COLCON_WS_SRC
25+
cp -r $GITHUB_WORKSPACE $COLCON_WS_SRC
26+
cd $COLCON_WS
27+
rosdep install --from-paths ./ -i -y -r --rosdistro $ROS_DISTRO $ROSDEP_ARGS
28+
source /opt/ros/$ROS_DISTRO/setup.bash
29+
colcon build --event-handlers console_direct+
30+
31+
# Tests.
32+
colcon test --event-handlers console_direct+
33+
colcon test-result

.github/workflows/ros2-ci.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ROS2 CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
rqt_robot_steering_ci:
7+
name: rqt_robot_steering_transport CI
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- docker-image: "ubuntu:24.04"
14+
ros-distro: "rolling"
15+
container:
16+
image: ${{ matrix.docker-image }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Build and Test
21+
run: .github/workflows/build-and-test.sh
22+
env:
23+
DOCKER_IMAGE: ${{ matrix.docker-image }}
24+
ROS_DISTRO: ${{ matrix.ros-distro }}

0 commit comments

Comments
 (0)