-
Notifications
You must be signed in to change notification settings - Fork 74
89 lines (79 loc) · 2.9 KB
/
build-and-test_projects.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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