-
Notifications
You must be signed in to change notification settings - Fork 71
81 lines (74 loc) · 2.38 KB
/
build.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
name: limap
on:
push:
branches:
- main
- release/*
pull_request:
types: [ assigned, opened, synchronize, reopened ]
release:
types: [ published, edited ]
jobs:
build:
name: ${{ matrix.config.os }} ${{ matrix.config.arch }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config: [
{os: ubuntu-latest},
]
env:
COMPILER_CACHE_VERSION: 1
COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache
CCACHE_DIR: ${{ github.workspace }}/compiler-cache/ccache
CCACHE_BASEDIR: ${{ github.workspace }}
# For faster builds in PRs, skip all but the latest Python versions.
PULL_REQUEST_CIBW_BUILD: cp39-{manylinux}*
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-builds
with:
key: limap-v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.run_id }}-${{ github.run_number }}
restore-keys: limap-v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}
path: ${{ env.COMPILER_CACHE_DIR }}
- name: Set env (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y \
git \
build-essential \
cmake \
ninja-build \
libboost-program-options-dev \
libboost-graph-dev \
libboost-system-dev \
libeigen3-dev \
libceres-dev \
libflann-dev \
libfreeimage-dev \
libmetis-dev \
libgoogle-glog-dev \
libgtest-dev \
libgmock-dev \
libsqlite3-dev \
libglew-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev \
libcgal-qt5-dev \
libgl1-mesa-dri \
libunwind-dev \
xvfb
- name: Install Python dependencies
run: |
git submodule update --init --recursive
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install -r requirements.txt # If you have a requirements file
- name: Build
run: |
python -m pip install -v .
- name: Run Python tests
run: |
python -c "import limap; print(limap.__version__)"