now ubuntu 20.04 #46
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: CMake on a single platform | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: Release | |
GTSAM_DIR: /usr/local/lib/cmake/GTSAM | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake make gcc g++ libboost-all-dev libpcl-dev libopencv-dev libyaml-cpp-dev intel-mkl libtbb-dev | |
- name: List TBB include directory | |
run: ls -l /usr/include/tbb | |
- name: List TBB library directory | |
run: ls -l /usr/lib/x86_64-linux-gnu | grep tbb | |
- name: Install GTSAM from source | |
run: | | |
git clone --branch 4.0.3 https://github.com/borglab/gtsam.git | |
cd gtsam | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release | |
make -j$(nproc) | |
sudo make install | |
- name: Install ISPC | |
run: | | |
wget https://github.com/ispc/ispc/releases/download/v1.24.0/ispc-v1.24.0-linux.tar.gz | |
tar -xzf ispc-v1.24.0-linux.tar.gz | |
sudo cp ispc-v1.24.0-linux/bin/ispc /usr/local/bin/ | |
- name: Clone Open3D repository | |
run: git clone https://github.com/isl-org/Open3D | |
- name: Install Open3D dependencies | |
working-directory: Open3D | |
run: util/install_deps_ubuntu.sh | |
- name: Configure Open3D | |
working-directory: Open3D | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/open3d_install -DBUILD_PYTHON_MODULE=OFF -DISPC_EXECUTABLE=/usr/local/bin/ispc -Wno-dev | |
- name: Build Open3D | |
working-directory: Open3D/build | |
run: make -j$(nproc) | |
- name: Install Open3D C++ library | |
working-directory: Open3D/build | |
run: sudo make install | |
- name: Set Open3D CMake path | |
run: echo "Open3D_DIR=$HOME/open3d_install/lib/cmake/Open3D" >> $GITHUB_ENV | |
- name: Configure CMake for the project | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DGTSAM_DIR=${{ env.GTSAM_DIR }} -DOpen3D_DIR=${{ env.Open3D_DIR }} | |
- name: Build the project | |
run: cmake --build build --config ${{ env.BUILD_TYPE }} | |
- name: Test the project | |
working-directory: build | |
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure |