Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# ROS build pipeline based on kr_mav_control build
# https://github.com/KumarRobotics/kr_mav_control/blob/master/.github/workflows/build.yml
# ROS 2 build pipeline
name: build

on:
push:
branches: [main]
branches: [ros2]
pull_request:
branches: [ros2]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
Expand All @@ -13,37 +14,28 @@ jobs:
build:
strategy:
matrix:
ros_distro: [noetic]
ros_distro: [humble, jazzy]

runs-on: ubuntu-latest
container: osrf/ros:${{ matrix.ros_distro }}-desktop
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Apt dependencies
run: |
apt-get update
apt-get install -qy g++ libeigen3-dev git python3-catkin-tools
apt-get install -qy python3-colorama python3-zmq python3-lz4
apt-get install -qy python3-colcon-common-extensions python3-rosdep
apt-get install -qy python3-colorama python3-zmq python3-lz4 python3-pytest ros-${ROS_DISTRO}-smach
rosdep update
rosdep install --from-paths . --ignore-src -y -r --as-root apt:false

- name: Setup catkin workspace
run: |
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
mkdir -p ${RUNNER_WORKSPACE}/catkin_ws/src
cd ${RUNNER_WORKSPACE}/catkin_ws
catkin init
catkin build -j2 --no-status -DCMAKE_BUILD_TYPE=Release

- name: Build workspace
run: |
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
cd ${RUNNER_WORKSPACE}/catkin_ws/src
ln -s ${GITHUB_WORKSPACE}
catkin build -j2 --no-status -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17
colcon build --event-handlers console_direct+

- name: Run Tests
run: |
cd ${RUNNER_WORKSPACE}/catkin_ws/src/MOCHA/mocha_core/scripts/core/test
./run_tests.sh ${RUNNER_WORKSPACE}/catkin_ws
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
colcon test --event-handlers console_direct+
colcon test-result --verbose
Loading