{Documentation} AEA Update #15
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: Build projects | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Build ${{ matrix.project }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
project: [AriaPilotDatasetTools, EgoExo] | |
steps: | |
- name : Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- 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 \ | |
libgtest-dev libgmock-dev \ | |
libfmt-dev libcereal-dev \ | |
libturbojpeg-dev libpng-dev \ | |
liblz4-dev libzstd-dev libxxhash-dev \ | |
libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-date-time-dev | |
# Build Cereal (header only library) | |
cd /tmp; git clone https://github.com/USCiLab/cereal.git -b v1.3.2 \ | |
&& cd cereal \ | |
&& cmake -DSKIP_PORTABILITY_TEST=1 -DJUST_INSTALL_CEREAL=ON .; sudo make -j$thread install; rm -rf /tmp/cereal; | |
# 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 cereal googletest 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 -b v0.8 \ | |
&& 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: Install additional deps | |
if: matrix.project == 'EgoExo' && matrix.os == 'ubuntu-latest' | |
shell: bash | |
run: | | |
sudo apt-get install libboost-iostreams-dev | |
- name: Configure & build project | |
shell: bash | |
run: | | |
mkdir build | |
cmake -DCMAKE_BUILD_TYPE=RELEASE -S ./projects/${{ matrix.project }} -B build | |
cd build | |
make -j8 |