Skip to content

{BugFix}[Project Aria Tools][Aria Studio][Rerun] Python - Split MPS r… #673

{BugFix}[Project Aria Tools][Aria Studio][Rerun] Python - Split MPS r…

{BugFix}[Project Aria Tools][Aria Studio][Rerun] Python - Split MPS r… #673

name: Build and Test
on:
push:
branches: [main]
paths-ignore:
- "**/website/**"
pull_request:
branches: [main]
paths-ignore:
- "**/website/**"
jobs:
build:
name: Build projectaria_tools on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13, macos-14] # macos-14 is macSilicon
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 \
libgtest-dev libgmock-dev \
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 googletest glog lz4 zstd xxhash libpng jpeg-turbo
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Configure
shell: bash
run: |
mkdir build
cmake -DCMAKE_BUILD_TYPE=RELEASE -S . -B build \
-DBUILD_UNIT_TEST=ON
- name: C++ - Build and Test
shell: bash
run: |
cd build
make -j8
ctest -j
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Python - Build and Test Python bindings
shell: bash
run: |
# Build and install Python bindings
CMAKE_BUILD_PARALLEL_LEVEL=4 pip3 install .
# Run Python unit tests
export TEST_FOLDER="./data/"
python3 -m unittest core/python/test/corePyBindTest.py
python3 -m unittest core/python/test/mpsPyBindTest.py
python3 -m unittest core/python/sophus/test/sophusPybindTest.py
- name: Test Python Notebooks
shell: bash
run: |
cd core/examples
# Installing dependencies
pip3 install jupyter matplotlib tqdm pillow
# Running the notebooks
jupyter nbconvert --execute --inplace dataprovider_quickstart_tutorial.ipynb
# Install additional required dependencies
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y curl unzip
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install curl unzip
else
echo "$RUNNER_OS not supported"
exit 1
fi
pip3 install plotly
jupyter nbconvert --execute --inplace mps_quickstart_tutorial.ipynb