Skip to content

Refined P3P solver, and a new implementation for rel_pose_upright_3pt #89

Refined P3P solver, and a new implementation for rel_pose_upright_3pt

Refined P3P solver, and a new implementation for rel_pose_upright_3pt #89

Workflow file for this run

name: Build PoseLib
on:
pull_request:
branches:
- '**'
env:
BUILD_CONFIGURATION: Release
LIBRARY_TYPE: OFF # Static libraries
BUILD_DIR: _build
INSTALL_DIR: _install
jobs:
CI-pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Fetches all submodules recursively.
submodules: 'recursive'
- name: Install Eigen3 Dependency
run: |
sudo apt-get update && \
sudo apt-get install -y libeigen3-dev clang-format
- name: Check formatting using clang-format
run: |
git ls-files | grep -E '\.(cc|h)$' | xargs clang-format -i --verbose
git diff --exit-code || (echo "Code format check failed, run clang-format to fix it." && exit 1)
- name: Setup CMake Configuration
run: |
cmake \
-B ${{github.workspace}}/${{env.BUILD_DIR}} \
-DWITH_BENCHMARK=ON \
-DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} \
-DBUILD_SHARED_LIBS=${{env.LIBRARY_TYPE}} \
-DPYTHON_PACKAGE=ON \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/${{env.INSTALL_DIR}}
- name: Compile and Install
run: |
cmake \
--build ${{github.workspace}}/${{env.BUILD_DIR}} \
--target install \
-j $(nproc)
- name: Execute Benchmark
run: ${{github.workspace}}/${{env.INSTALL_DIR}}/bin/benchmark