1- # ROS build pipeline based on kr_mav_control build
2- # https://github.com/KumarRobotics/kr_mav_control/blob/master/.github/workflows/build.yml
1+ # ROS 2 build pipeline
32name : build
43
54on :
65 push :
7- branches : [main]
6+ branches : [ros2]
7+ pull_request :
8+ branches : [ros2]
89 workflow_dispatch :
910 schedule :
1011 - cron : ' 0 0 * * 0'
@@ -13,37 +14,28 @@ jobs:
1314 build :
1415 strategy :
1516 matrix :
16- ros_distro : [noetic ]
17+ ros_distro : [humble, jazzy ]
1718
1819 runs-on : ubuntu-latest
1920 container : osrf/ros:${{ matrix.ros_distro }}-desktop
2021 steps :
21- - uses : actions/checkout@v3
22+ - uses : actions/checkout@v4
2223
2324 - name : Apt dependencies
2425 run : |
2526 apt-get update
26- apt-get install -qy g++ libeigen3-dev git python3-catkin-tools
27- apt-get install -qy python3-colorama python3-zmq python3-lz4
27+ apt-get install -qy python3-colcon-common-extensions python3-rosdep
28+ apt-get install -qy python3-colorama python3-zmq python3-lz4 python3-pytest ros-${ROS_DISTRO}-smach
2829 rosdep update
2930 rosdep install --from-paths . --ignore-src -y -r --as-root apt:false
3031
31- - name : Setup catkin workspace
32- run : |
33- . /opt/ros/${{ matrix.ros_distro }}/setup.sh
34- mkdir -p ${RUNNER_WORKSPACE}/catkin_ws/src
35- cd ${RUNNER_WORKSPACE}/catkin_ws
36- catkin init
37- catkin build -j2 --no-status -DCMAKE_BUILD_TYPE=Release
38-
3932 - name : Build workspace
4033 run : |
4134 . /opt/ros/${{ matrix.ros_distro }}/setup.sh
42- cd ${RUNNER_WORKSPACE}/catkin_ws/src
43- ln -s ${GITHUB_WORKSPACE}
44- catkin build -j2 --no-status -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17
35+ colcon build --event-handlers console_direct+
4536
4637 - name : Run Tests
4738 run : |
48- cd ${RUNNER_WORKSPACE}/catkin_ws/src/MOCHA/mocha_core/scripts/core/test
49- ./run_tests.sh ${RUNNER_WORKSPACE}/catkin_ws
39+ . /opt/ros/${{ matrix.ros_distro }}/setup.sh
40+ colcon test --event-handlers console_direct+
41+ colcon test-result --verbose
0 commit comments