Skip to content

Use ros official docker image in CI #77

Use ros official docker image in CI

Use ros official docker image in CI #77

Workflow file for this run

name: build
on:
pull_request:
branches:
- humble
- develop
jobs:
job:
name: Build
runs-on: ubuntu-22.04
container: ros:humble-ros-core
steps:
- name: Install Git and software-properties-common
run: |
apt-get update
apt-get install -y git software-properties-common
shell: bash
- uses: actions/checkout@v2
with:
submodules: true
- name: Copy repository
run: |
mkdir -p ~/ros2_ws/src/li_slam_ros2
cp -rf . ~/ros2_ws/src/li_slam_ros2
- name: Install gtsam
run: |
add-apt-repository ppa:borglab/gtsam-release-4.1
apt update
apt install -y libgtsam-dev libgtsam-unstable-dev
- name: Install dependencies
run: |
source /opt/ros/humble/setup.bash
apt install -y python3-rosdep
rosdelp init
rosdep update
cd ~/ros2_ws/src
rosdep install -r -y --from-paths . --ignore-src
shell: bash
- name: Build packages
run: |
source /opt/ros/humble/setup.bash
# Install colcon
# Ref: https://index.ros.org/doc/ros2/Tutorials/Colcon-Tutorial/
sudo apt install python3-colcon-common-extensions
cd ~/ros2_ws
colcon build
source ~/ros2_ws/install/setup.bash
shell: bash