Refined rotation averaging #38
Workflow file for this run
This file contains 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: Ubuntu | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CTEST_EXCLUSIONS: (mvs/gpu_mat_test) | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-20.04] | |
cuda: [true, false] | |
asan: [true, false] | |
exclude: | |
- os: ubuntu-20.04 | |
cuda: true | |
asan: true | |
- os: ubuntu-20.04 | |
cuda: false | |
asan: true | |
- os: ubuntu-22.04 | |
asan: true | |
cuda: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- run: | | |
sudo apt-get update && sudo apt-get install -y \ | |
build-essential \ | |
ninja-build \ | |
libboost-program-options-dev \ | |
libboost-filesystem-dev \ | |
libboost-graph-dev \ | |
libboost-system-dev \ | |
libboost-test-dev \ | |
libeigen3-dev \ | |
libflann-dev \ | |
libfreeimage-dev \ | |
libmetis-dev \ | |
libgoogle-glog-dev \ | |
libgflags-dev \ | |
libsqlite3-dev \ | |
libglew-dev \ | |
qtbase5-dev \ | |
libqt5opengl5-dev \ | |
libcgal-dev \ | |
libcgal-qt5-dev \ | |
libgl1-mesa-dri \ | |
libunwind-dev \ | |
libgtest-dev \ | |
xvfb | |
name: Install dependencies | |
- run: | | |
sudo apt-get install -y \ | |
nvidia-cuda-toolkit \ | |
nvidia-cuda-toolkit-gcc | |
echo "CC=/usr/bin/cuda-gcc" >> $GITHUB_ENV | |
echo "CXX=/usr/bin/cuda-g++" >> $GITHUB_ENV | |
if: ${{ matrix.cuda && matrix.os == 'ubuntu-20.04' }} | |
name: Install CUDA | |
- run: | | |
sudo apt-get install -y \ | |
nvidia-cuda-toolkit \ | |
nvidia-cuda-toolkit-gcc \ | |
gcc-10 g++-10 | |
echo "CC=/usr/bin/gcc-10" >> $GITHUB_ENV | |
echo "CXX=/usr/bin/g++-10" >> $GITHUB_ENV | |
echo "CUDAHOSTCXX=/usr/bin/g++-10" >> $GITHUB_ENV | |
if: ${{ matrix.cuda && matrix.os == 'ubuntu-22.04' }} | |
name: Install CUDA | |
- run: | | |
sudo apt-get install -y clang-15 | |
echo "CC=/usr/bin/clang-15" >> $GITHUB_ENV | |
echo "CXX=/usr/bin/clang++-15" >> $GITHUB_ENV | |
echo 'CTEST_EXCLUSIONS="(feature/sift_test)|(util/opengl_utils_test)|(mvs/gpu_mat_test)"' >> $GITHUB_ENV | |
if: ${{ matrix.asan }} | |
name: Install Clang | |
- run: | | |
CMAKE_VERSION=3.28.6 | |
CMAKE_DIR=cmake-${CMAKE_VERSION}-linux-x86_64 | |
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_DIR}.tar.gz | |
tar -xzf ${CMAKE_DIR}.tar.gz | |
sudo cp -r ${CMAKE_DIR}/* /usr/local/ | |
rm -rf ${CMAKE_DIR}* | |
name: Upgrade CMake | |
- run: | | |
sudo apt-get install -y \ | |
libgoogle-glog-dev \ | |
libgflags-dev \ | |
libatlas-base-dev \ | |
libsuitesparse-dev | |
wget https://github.com/ceres-solver/ceres-solver/archive/refs/tags/2.2.0.tar.gz | |
mv 2.2.0.tar.gz ceres-solver-2.2.0.tar.gz | |
tar zxf ceres-solver-2.2.0.tar.gz | |
mkdir ceres-bin | |
cd ceres-bin | |
cmake ../ceres-solver-2.2.0 | |
make -j3 | |
make test | |
sudo make install | |
name: Install Ceres 2.2.0 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: | | |
cmake --version | |
mkdir build | |
cd build | |
cmake .. \ | |
-GNinja \ | |
-DTESTS_ENABLED=ON \ | |
-DASAN_ENABLED=${{ matrix.asan }} | |
ninja | |
name: Configure and build | |
- run: | | |
export DISPLAY=":99.0" | |
export QT_QPA_PLATFORM="offscreen" | |
Xvfb :99 & | |
sleep 3 | |
cd build | |
ctest -E "$CTEST_EXCLUSIONS" | |
tests_pass=$? | |
if [ $tests_pass -ne 0 ]; then | |
echo "Tests failed, rerunning with verbose output" | |
ctest --rerun-failed --output-on-failure | |
fi | |
exit $tests_pass | |
name: Run tests |