Skip to content

Commit

Permalink
ros2: Add CI (#93)
Browse files Browse the repository at this point in the history
* Fix unknown CMP0148 with a cmake minimum range

Signed-off-by: Ryan Friedman <[email protected]>

* Adapt for MacOS on 3.28

* Use 3 dots for version range

Signed-off-by: Ryan Friedman <[email protected]>

* Add CI

Signed-off-by: Ryan Friedman <[email protected]>

* Test everything

Signed-off-by: Ryan Friedman <[email protected]>

* Remove extra rosdistro arg

Signed-off-by: Ryan Friedman <[email protected]>

---------

Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 authored Dec 6, 2023
1 parent 37547f0 commit dc6c452
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Test
on: push

jobs:
build:
runs-on: [ubuntu-22.04]
strategy:
fail-fast: false
matrix:
config:
- {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'}
container: ${{ matrix.config.container }}
steps:
- uses: actions/checkout@v4
- name: Install binary dependencies with rosdep
run: |
apt update
rosdep update
source /opt/ros/${{ matrix.config.rosdistro }}/setup.bash
rosdep install --from-paths . --ignore-src -y
shell: bash
- name: Build with colcon
run: |
source /opt/ros/${{ matrix.config.rosdistro }}/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
shell: bash
- name: Run tests
run: |
source /opt/ros/${{ matrix.config.rosdistro }}/setup.bash
colcon test --event-handlers=console_cohesion+
colcon test-result --all --verbose
shell: bash
6 changes: 4 additions & 2 deletions mav_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.14.4)
cmake_minimum_required(VERSION 3.14.4...3.27)
project(mav_msgs)

cmake_policy(SET CMP0148 OLD)
if(${CMAKE_VERSION} VERSION_GREATER 3.27)
cmake_policy(SET CMP0148 OLD)
endif()

find_package(ament_cmake REQUIRED)

Expand Down
6 changes: 4 additions & 2 deletions mav_planning_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.14.4)
cmake_minimum_required(VERSION 3.14.4...3.27)
project(mav_planning_msgs)

cmake_policy(SET CMP0148 OLD)
if(${CMAKE_VERSION} VERSION_GREATER 3.27)
cmake_policy(SET CMP0148 OLD)
endif()

find_package(ament_cmake REQUIRED)

Expand Down
6 changes: 4 additions & 2 deletions mav_state_machine_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.14.4)
cmake_minimum_required(VERSION 3.14.4...3.27)
project(mav_state_machine_msgs)

cmake_policy(SET CMP0148 OLD)
if(${CMAKE_VERSION} VERSION_GREATER 3.27)
cmake_policy(SET CMP0148 OLD)
endif()

find_package(ament_cmake REQUIRED)

Expand Down
6 changes: 4 additions & 2 deletions mav_system_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.14.4)
cmake_minimum_required(VERSION 3.14.4...3.27)
project(mav_system_msgs)

cmake_policy(SET CMP0148 OLD)
if(${CMAKE_VERSION} VERSION_GREATER 3.27)
cmake_policy(SET CMP0148 OLD)
endif()

find_package(std_msgs REQUIRED)

Expand Down

0 comments on commit dc6c452

Please sign in to comment.