forked from facebookresearch/projectaria_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fbshipit-source-id: 11860c868779047b101df6287fd211cfa9caa5ee
- Loading branch information
0 parents
commit e59d2b1
Showing
455 changed files
with
75,502 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.vrs filter=lfs diff=lfs merge=lfs -text | ||
*.csv.gz filter=lfs diff=lfs merge=lfs -text |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
name: Build projectaria_tools on ${{ matrix.os }} / ${{ matrix.cmakeOptions }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest] | ||
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-chrono-dev \ | ||
libboost-date-time-dev \ | ||
libboost-filesystem-dev \ | ||
libboost-iostreams-dev \ | ||
libboost-system-dev \ | ||
libboost-thread-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: Configure | ||
shell: bash | ||
run: | | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=RELEASE -S . -B build \ | ||
-DBUILD_UNIT_TEST=ON | ||
- name: Build and Test | ||
shell: bash | ||
run: | | ||
cd build | ||
make -j8 | ||
ctest -j | ||
- name: Build Python bindings | ||
shell: bash | ||
run: | | ||
# Installing Python and dependencies | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
sudo apt-get install libpython3-dev python3-pip | ||
sudo pip3 install numpy | ||
elif [ "$RUNNER_OS" == "macOS" ]; then | ||
pip3 install numpy | ||
else | ||
echo "$RUNNER_OS not supported" | ||
exit 1 | ||
fi | ||
# Build and install Python bindings | ||
pip3 install --global-option=build_ext --global-option="-j8" . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
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: [ | ||
PROJECTARIA_TOOLS_BUILD_PROJECTS_ADT, | ||
PROJECTARIA_TOOLS_BUILD_TOOLS] | ||
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 \ | ||
libfmt-dev libcereal-dev \ | ||
libturbojpeg-dev libpng-dev \ | ||
liblz4-dev libzstd-dev libxxhash-dev \ | ||
libboost-chrono-dev \ | ||
libboost-date-time-dev \ | ||
libboost-filesystem-dev \ | ||
libboost-iostreams-dev \ | ||
libboost-system-dev \ | ||
libboost-thread-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 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 \ | ||
&& 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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build wheels and deploy | ||
|
||
on: | ||
# this workflow can only be manually triggered for now. | ||
workflow_dispatch: | ||
inputs: | ||
deploy: | ||
description: 'Where to deploy the artifacts? Only build (build), deploy to test PyPI (test), or deploy to PyPI (prod).' | ||
required: true | ||
type: choice | ||
default: 'build' | ||
options: | ||
- build | ||
- test | ||
- prod | ||
|
||
jobs: | ||
build-wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macOS-latest, ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Upgrade pip | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
- name: Install cibuildwheel | ||
run: | | ||
python3 -m pip install cibuildwheel | ||
- name: Build wheels for CPython | ||
run: | | ||
python3 -m cibuildwheel --output-dir dist | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: python-package-distributions | ||
path: dist | ||
publish-to-pypi: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-wheels | ||
steps: | ||
- name: Download wheels from previous jobs | ||
# by default this will download all artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
# PyPI publish action uploads everything under dist/* by default | ||
path: dist | ||
|
||
- name: Display the list of artifacts | ||
run: ls -R dist | ||
|
||
- name: Publish to Test PyPI | ||
if: github.event.inputs.deploy == 'test' | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN_PROJECTARIA_TOOLS }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: true | ||
verbose: true | ||
- name: Publish to PyPI | ||
if: github.event.inputs.deploy == 'prod' | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN_PROJECTARIA_TOOLS_DEV }} | ||
skip_existing: true | ||
verbose: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: publish website | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_docs_job: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install doxygen | ||
- name: Build the Website | ||
run: | | ||
cd website | ||
yarn install | ||
yarn run build | ||
id: build | ||
- name: Get output time | ||
run: echo "The time was ${{ steps.build.outputs.time }}" | ||
- name: Deploy | ||
if: ${{ github.event_name == 'push' }} | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: website/build # The folder the action should deploy. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build/** | ||
dist/** | ||
website/yarn.lock | ||
projectaria_tools.egg-info/** | ||
projectaria_tools_dev.egg-info/** |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
cmake_minimum_required(VERSION 3.12) | ||
|
||
project(projectaria_tools | ||
VERSION 0.1 | ||
DESCRIPTION "Tools to process and use Project Aria data." | ||
LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
# Build in Release mode by default | ||
if (NOT CMAKE_BUILD_TYPE AND NOT MSVC) | ||
set(CMAKE_BUILD_TYPE "Release") | ||
endif (NOT CMAKE_BUILD_TYPE AND NOT MSVC) | ||
|
||
# Project CMAKE options | ||
option(BUILD_PYTHON_BINDINGS "Build python binding." OFF) | ||
option(BUILD_UNIT_TEST "Build tests." OFF) | ||
option(PROJECTARIA_TOOLS_BUILD_PROJECTS "Build projects." OFF) | ||
option(PROJECTARIA_TOOLS_BUILD_TOOLS "Build tools." OFF) | ||
|
||
if(BUILD_UNIT_TEST) | ||
enable_testing() | ||
endif(BUILD_UNIT_TEST) | ||
|
||
# Additional CMake configuration to setup 3rd party libraries | ||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
include(${CMAKE_MODULE_PATH}/Setup3rdParty.cmake) | ||
|
||
# Adding core libraries | ||
message("- Compiling Core.") | ||
add_subdirectory(core) | ||
|
||
if(PROJECTARIA_TOOLS_BUILD_PROJECTS) | ||
message("- Compiling Projects.") | ||
add_subdirectory(projects) | ||
endif() | ||
|
||
if(PROJECTARIA_TOOLS_BUILD_TOOLS AND NOT BUILD_PYTHON_BINDINGS) | ||
message("- Compiling Tools.") | ||
add_subdirectory(tools) | ||
endif() |
Oops, something went wrong.