Adding OpenGV as submodule (optional) #1584
Workflow file for this run
This file contains hidden or 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
| name: CMake | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - '**' | |
| env: | |
| BUILD_TYPE: Release | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-22.04, windows-2022] | |
| 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" | |
| - os: windows-2022 | |
| extra_deps: "" | |
| extra_cmake_def: '-DBUILD_AS_BUNDLE=ON' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Windows Dependencies | |
| if: matrix.os == 'windows-2022' | |
| uses: ./.github/actions/install-windows-deps | |
| - name: Install Linux Dependencies | |
| if: matrix.os != 'windows-2022' | |
| run: | | |
| DEBIAN_FRONTEND=noninteractive | |
| sudo apt-get update | |
| sudo apt-get -y install libopencv-dev libpcl-dev git cmake software-properties-common libyaml-cpp-dev ${{ matrix.extra_deps }} | |
| - name: Configure CMake | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| cmake ` | |
| -B ${{github.workspace}}/build ` | |
| -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ` | |
| ${{ matrix.extra_cmake_def }} ` | |
| -DVCPKG_MANIFEST_INSTALL=OFF ` | |
| -DVCPKG_TARGET_TRIPLET=x64-windows-release ` | |
| -DVCPKG_INSTALLED_DIR="${{env.VCPKG_EXPORT_PATH}}/installed" ` | |
| -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_EXPORT_PATH}}/scripts/buildsystems/vcpkg.cmake | |
| - name: Configure CMake | |
| if: matrix.os != 'windows-2022' | |
| run: | | |
| cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extra_cmake_def }} | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
| - name: Build Package | |
| if: matrix.os == 'windows-2022' | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target package | |
| - name: Info | |
| working-directory: ${{github.workspace}}/build/bin | |
| run: | | |
| ./rtabmap-console --version | |
| - name: Upload RTABMap Artifacts | |
| if: matrix.os == 'windows-2022' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RTABMap-Binaries # Give your artifact a recognizable name | |
| path: build/RTABMap-* # Supports wildcards for files and directories | |
| if-no-files-found: warn # Optional: warn, error, or ignore | |
| # - name: Test | |
| # working-directory: ${{github.workspace}}/build | |
| # # Execute tests defined by the CMake configuration. | |
| # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
| # run: ctest -C ${{env.BUILD_TYPE}} | |