mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-13 23:10:20 +08:00
Added libceres-dev dep in CI (#1547)
* Added libceres-dev dep in CI * trying to fix 22.04 apt install * added g2o and gtam deps * removed libgtsam-dev because missing libCppUnitLite.a * fixing support of libg2o-dev on ubuntu 24.04 * update cmake
This commit is contained in:
@@ -19,19 +19,26 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-24.04, ubuntu-22.04]
|
os: [ubuntu-24.04, ubuntu-22.04]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
extra_deps: "libunwind-dev libceres-dev"
|
||||||
|
extra_cmake_def: ""
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
extra_deps: "libg2o-dev libceres-dev"
|
||||||
|
extra_cmake_def: "-DWITH_CERES=ON"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
DEBIAN_FRONTEND=noninteractive
|
DEBIAN_FRONTEND=noninteractive
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install libopencv-dev libpcl-dev git cmake software-properties-common libyaml-cpp-dev
|
sudo apt-get -y install libopencv-dev libpcl-dev git cmake software-properties-common libyaml-cpp-dev ${{ matrix.extra_deps }}
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: |
|
run: |
|
||||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extra_cmake_def }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||||
|
|||||||
+20
-11
@@ -501,21 +501,30 @@ IF(WITH_G2O)
|
|||||||
get_target_property(G2O_INCLUDES g2o::core INTERFACE_INCLUDE_DIRECTORIES)
|
get_target_property(G2O_INCLUDES g2o::core INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
MESSAGE(STATUS "g2o include dir: ${G2O_INCLUDES}")
|
MESSAGE(STATUS "g2o include dir: ${G2O_INCLUDES}")
|
||||||
FIND_FILE(G2O_FACTORY_FILE g2o/core/factory.h
|
FIND_FILE(G2O_FACTORY_FILE g2o/core/factory.h
|
||||||
PATHS ${G2O_INCLUDES}
|
PATHS ${G2O_INCLUDES}
|
||||||
NO_DEFAULT_PATH)
|
NO_DEFAULT_PATH)
|
||||||
FILE(READ ${G2O_FACTORY_FILE} TMPTXT)
|
FILE(READ ${G2O_FACTORY_FILE} TMPTXT)
|
||||||
STRING(FIND "${TMPTXT}" "shared_ptr" matchres)
|
STRING(FIND "${TMPTXT}" "shared_ptr" matchres)
|
||||||
IF(${matchres} EQUAL -1)
|
IF(${matchres} EQUAL -1)
|
||||||
MESSAGE(STATUS "Old g2o factory version detected without shared ptr (factory file: ${G2O_FACTORY_FILE}).")
|
MESSAGE(STATUS "Old g2o factory version detected without shared ptr (factory file: ${G2O_FACTORY_FILE}).")
|
||||||
SET(G2O_CPP11 2)
|
SET(G2O_CPP11 2)
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE(STATUS "Latest g2o factory version detected with shared ptr (factory file: ${G2O_FACTORY_FILE}).")
|
MESSAGE(STATUS "Latest g2o factory version detected with shared ptr (factory file: ${G2O_FACTORY_FILE}).")
|
||||||
SET(G2O_CPP11 1)
|
SET(G2O_CPP11 1)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
FIND_PACKAGE(G2O QUIET)
|
FIND_PACKAGE(G2O QUIET)
|
||||||
IF(G2O_FOUND)
|
IF(G2O_FOUND)
|
||||||
MESSAGE(STATUS "Found g2o: ${G2O_INCLUDE_DIRS}")
|
MESSAGE(STATUS "Found g2o: ${G2O_INCLUDE_DIRS}")
|
||||||
|
FIND_FILE(G2O_FACTORY_FILE g2o/core/factory.h
|
||||||
|
PATHS ${G2O_INCLUDES}
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
FILE(READ ${G2O_FACTORY_FILE} TMPTXT)
|
||||||
|
STRING(FIND "${TMPTXT}" "shared_ptr" matchres)
|
||||||
|
IF(NOT ${matchres} EQUAL -1)
|
||||||
|
MESSAGE(STATUS "Latest g2o factory version detected with shared ptr (factory file: ${G2O_FACTORY_FILE}).")
|
||||||
|
SET(G2O_CPP11 1)
|
||||||
|
ENDIF()
|
||||||
ENDIF(G2O_FOUND)
|
ENDIF(G2O_FOUND)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(WITH_G2O)
|
ENDIF(WITH_G2O)
|
||||||
|
|||||||
Reference in New Issue
Block a user