Skip to content

{Feature} C++ - Core - Calibration - unit test for cast in CameraProjection #671

{Feature} C++ - Core - Calibration - unit test for cast in CameraProjection

{Feature} C++ - Core - Calibration - unit test for cast in CameraProjection #671

name: Build projects
on:
push:
branches: [main]
paths-ignore:
- "**/website/**"
pull_request:
branches: [main]
paths-ignore:
- "**/website/**"
jobs:
build:
name: Build ${{ matrix.project }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13, macos-14] # macos-14 is macSilicon
project: [
PROJECTARIA_TOOLS_BUILD_PROJECTS_ADT,
PROJECTARIA_TOOLS_BUILD_TOOLS]
steps:
- name : Checkout
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
# Update & upgrade package lists
sudo apt-get update -y
sudo apt-get upgrade
# Deal with Github CI limitation
# https://github.com/actions/runner-images/issues/6399#issuecomment-1285011525
sudo apt install -y libunwind-dev
# Generic dependencies
sudo apt-get install cmake
# Install VRS dependencies
sudo apt-get install -o Acquire::Retries=5 \
libfmt-dev \
libturbojpeg-dev libpng-dev \
liblz4-dev libzstd-dev libxxhash-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-system-dev
# Clean APT cache
sudo apt-get clean
elif [ "$RUNNER_OS" == "macOS" ]; then
# Install system deps with Homebrew
brew install cmake
# VRS dependencies
brew install boost fmt sophus glog lz4 zstd xxhash libpng jpeg-turbo
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Install & build Pangolin
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install \
libeigen3-dev \
libglew-dev libgl1-mesa-dev \
libwayland-dev libxkbcommon-dev wayland-protocols
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install eigen glew
fi
# Build and install Pangolin (optional)
cd /tmp; git clone https://github.com/stevenlovegrove/Pangolin.git \
&& cd Pangolin && git checkout d25ec009bd5cd9ac4b4a2b6750fec5093c46d601 && cd .. \
&& mkdir Pangolin_Build && cd Pangolin_Build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=OFF -DBUILD_PANGOLIN_PYTHON=OFF -DBUILD_EXAMPLES=OFF ../Pangolin/ \
&& sudo make -j$thread install;
- name: Configure & build project
shell: bash
run: |
mkdir build
cmake -DCMAKE_BUILD_TYPE=RELEASE -S ./ -B build -D${{ matrix.project }}=ON -DPROJECTARIA_TOOLS_BUILD_PROJECTS=ON
cd build
make -j8