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
This commit is contained in:
matlabbe
2023-04-04 20:46:53 -07:00
committed by GitHub
parent 607f66f489
commit 70359c5bd9
+11 -22
View File
@@ -20,12 +20,11 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, ubuntu-18.04] os: [ubuntu-20.04]
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
ros_distro: 'noetic' ros_distro: 'noetic'
- os: ubuntu-18.04
ros_distro: 'melodic'
steps: steps:
- uses: ros-tooling/[email protected] - uses: ros-tooling/[email protected]
@@ -35,38 +34,28 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update 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 sudo apt-get -y remove ros-${{ matrix.ros_distro }}-rtabmap
- uses: actions/checkout@v2
with:
repository: 'introlab/rtabmap'
path: 'rtabmap'
- name: Setup catkin workspace - name: Setup catkin workspace
run: | run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash source /opt/ros/${{ matrix.ros_distro }}/setup.bash
mkdir -p ${{github.workspace}}/catkin_ws/src mkdir -p ${{github.workspace}}/catkin_ws/src
cd ${{github.workspace}}/catkin_ws/src cd ${{github.workspace}}/catkin_ws/src
catkin_init_workspace
cd .. 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 - uses: actions/checkout@v2
with: with:
path: 'catkin_ws/src/rtabmap_ros' path: 'catkin_ws/src/rtabmap_ros'
- name: Build latest rtabmap library - name: caktkin build
run: | run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash 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
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
source ${{github.workspace}}/catkin_ws/devel/setup.bash
cd ${{github.workspace}}/catkin_ws cd ${{github.workspace}}/catkin_ws
catkin_make -DSETUPTOOLS_DEB_LAYOUT=OFF catkin build -p 1 -i
catkin_make install