build #137
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ROS build pipeline based on kr_mav_control build | |
# https://github.com/KumarRobotics/kr_mav_control/blob/master/.github/workflows/build.yml | |
name: build | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
ros_distro: [noetic] | |
runs-on: ubuntu-latest | |
container: osrf/ros:${{ matrix.ros_distro }}-desktop | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 | |
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 | |
- name: Run Tests | |
run: | | |
cd ${RUNNER_WORKSPACE}/catkin_ws/src/MOCHA/mocha_core/scripts/core/test | |
./run_tests.sh ${RUNNER_WORKSPACE}/catkin_ws |