mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: CMake-ROS
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
env:
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build:
|
|
# The CMake configure and build commands are platform agnostic and should work equally
|
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
# cross-platform coverage.
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
name: Build on ros ${{ matrix.ros_distribution }} and ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
ros_distribution: [ noetic, humble ]
|
|
include:
|
|
- ros_distribution: 'noetic'
|
|
os: ubuntu-20.04
|
|
- ros_distribution: 'humble'
|
|
os: ubuntu-22.04
|
|
|
|
steps:
|
|
- uses: ros-tooling/setup-ros@v0.7
|
|
with:
|
|
required-ros-distributions: ${{ matrix.ros_distribution }}
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
|
|
rosdep update
|
|
rosdep install --from-paths ${{github.workspace}} -y
|
|
|
|
- name: Configure CMake
|
|
run: |
|
|
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
|
|
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
|
|
- name: Build
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
|
|
- name: Info
|
|
working-directory: ${{github.workspace}}/build/bin
|
|
run: |
|
|
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
|
|
./rtabmap-console --version
|
|
|