-
Notifications
You must be signed in to change notification settings - Fork 605
70 lines (60 loc) · 1.93 KB
/
pybind.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
name: Pybind tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build sophus_pybind on ${{ matrix.os }} / ${{ matrix.cmakeOptions }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13]
fail-fast: false
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 libeigen3-dev libfmt-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 eigen fmt lz4 zstd xxhash
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Install sophus_pybind
shell: bash
run: |
# Installing Python and dependencies
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install libpython3-dev python3-pip
sudo pip3 install numpy pytest
elif [ "$RUNNER_OS" == "macOS" ]; then
pip3 install numpy pytest
else
echo "$RUNNER_OS not supported"
exit 1
fi
# Build and install Python bindings
pip3 install .
- name: Run sophus_pybind tests
shell: bash
run: python3 -m pytest sophus_pybind/tests/sophusPybindTests.py