forked from openMVG/openMVG
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.02 KB
/
compile_and_run_test_external_deps.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
name: CI-external-deps
on:
pull_request:
branches: [develop]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-tests:
name: ubuntu-latest - external deps
runs-on: ubuntu-latest
env:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- uses: actions/checkout@v2
- name: Git submodule
run: |
mkdir ./build
git submodule update -i
- name: 3rd Party libs
run: |
sudo apt-get update -y
sudo apt-get install -y git cmake
cd /tmp
git clone https://gitlab.com/libeigen/eigen.git -b 3.4.0
mkdir eigen_build
cd eigen_build
cmake -DCMAKE_BUILD_TYPE=RELEASE /tmp/eigen .
sudo make install
rm -rf /tmp/eigen
rm -rf /tmp/eigen_build
cd /tmp
git clone https://github.com/ceres-solver/ceres-solver.git -b 2.1.0
cd ceres-solver
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DMINIGLOG=ON .. .
sudo make install
rm -rf /tmp/ceres-solver
sudo apt-get install -y \
cmake \
coinor-libclp-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev
sudo apt-get autoclean && sudo apt-get clean
- name: Configure CMake
working-directory: ./build
run: |
cmake ../src \
-DOpenMVG_BUILD_SHARED=ON \
-DOpenMVG_BUILD_TESTS=ON \
-DOpenMVG_BUILD_EXAMPLES=ON \
-DOpenMVG_BUILD_SOFTWARES=ON \
-DTARGET_ARCHITECTURE=core \
-DCOINUTILS_INCLUDE_DIR_HINTS=/usr/include \
-DCLP_INCLUDE_DIR_HINTS=/usr/include \
-DOSI_INCLUDE_DIR_HINTS=/usr/include
shell: bash
- name: Build
working-directory: ./build
run: |
cmake --build . -- -j$(nproc)
shell: bash
- name: Unit Tests
working-directory: ./build
run: |
ctest -j$(nproc) --build-config Release