From 70359c5bd974c28c0f83eba516f86b6b7d429780 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Tue, 4 Apr 2023 20:46:53 -0700 Subject: [PATCH] CI: use catkin build to better detect dependencies issues (#934) * moved from catkin_make to catkin build to better detect dependencies issues * install catkin tools * add verbose * config install * added catkin clean * catkin init * fixed src * using extend * explicit install space * should work?! * removing 18.04/melodic build (https://github.com/actions/runner-images/issues/6002) * installing in /opt/ros seems not working on CI, fallback to just build without installing --- .github/workflows/ros1.yml | 39 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ros1.yml b/.github/workflows/ros1.yml index c55e27ee..e0ea3245 100644 --- a/.github/workflows/ros1.yml +++ b/.github/workflows/ros1.yml @@ -20,53 +20,42 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, ubuntu-18.04] + os: [ubuntu-20.04] include: - os: ubuntu-20.04 ros_distro: 'noetic' - - os: ubuntu-18.04 - ros_distro: 'melodic' + steps: - uses: ros-tooling/setup-ros@v0.2 with: required-ros-distributions: ${{ matrix.ros_distro }} - + - name: Install dependencies run: | sudo apt-get update - sudo apt-get -y install ros-${{ matrix.ros_distro }}-rtabmap-ros + sudo apt-get -y install ros-${{ matrix.ros_distro }}-rtabmap-ros python3-catkin-tools sudo apt-get -y remove ros-${{ matrix.ros_distro }}-rtabmap - - - uses: actions/checkout@v2 - with: - repository: 'introlab/rtabmap' - path: 'rtabmap' - + - name: Setup catkin workspace run: | source /opt/ros/${{ matrix.ros_distro }}/setup.bash mkdir -p ${{github.workspace}}/catkin_ws/src cd ${{github.workspace}}/catkin_ws/src - catkin_init_workspace cd .. - catkin_make - + catkin config --init --cmake-args -DSETUPTOOLS_DEB_LAYOUT=OFF + + - uses: actions/checkout@v2 + with: + repository: 'introlab/rtabmap' + path: 'catkin_ws/src/rtabmap' + - uses: actions/checkout@v2 with: path: 'catkin_ws/src/rtabmap_ros' - - - name: Build latest rtabmap library - run: | - source /opt/ros/${{ matrix.ros_distro }}/setup.bash - cd ${{github.workspace}}/rtabmap - cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/catkin_ws/devel - cmake --build build --config ${{env.BUILD_TYPE}} --target install - - name: caktkin_make + - name: caktkin build run: | source /opt/ros/${{ matrix.ros_distro }}/setup.bash - source ${{github.workspace}}/catkin_ws/devel/setup.bash cd ${{github.workspace}}/catkin_ws - catkin_make -DSETUPTOOLS_DEB_LAYOUT=OFF - catkin_make install + catkin build -p 1 -i