forked from isl-org/Open3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
173 lines (157 loc) · 4.81 KB
/
.travis.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
language: ruby
env:
global:
- SHARED=OFF
- BUILD_DEPENDENCY_FROM_SOURCE=OFF
notifications:
email:
on_success: never
on_failure: always
matrix:
include:
# Default environment of Ubuntu 14.04
- os: linux
dist: trusty
sudo: true
language: python
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- cmake-data # to use cmake 3.0 or more recent
- cmake
- os: linux
dist: trusty
sudo: required
language: python
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- cmake-data # to use cmake 3.0 or more recent
- cmake
env: SHARED=ON
- os: linux
dist: trusty
sudo: required
language: python
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- cmake-data # to use cmake 3.0 or more recent
- cmake
env: BUILD_DEPENDENCY_FROM_SOURCE=ON
# Similar environment of Ubuntu 16.04 (gcc 5.4)
# travis ci only supports Ubuntu 14.04 (trusty) gcc-5 and 6
# another option is to use docker.
- os: linux
dist: trusty
sudo: required
language: python
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- cmake-data # to use cmake 3.0 or more recent
- cmake
# Default environment of MacOS El Capitan
# compiled using clang shipped with xcode8
- os: osx
osx_image: xcode8
- os: osx
osx_image: xcode8
env: SHARED=ON
# Default environment of MacOS 10.13
# compiled using clang shipped with xcode10.1
- os: osx
osx_image: xcode10.1
- os: osx
osx_image: xcode10.1
env: BUILD_DEPENDENCY_FROM_SOURCE=ON
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
./util/scripts/install-deps-ubuntu.sh;
./util/scripts/make-documentation.sh;
./util/scripts/install-gtest.sh;
fi
# scripts/install-deps-osx.sh works well
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
./util/scripts/install-deps-osx.sh;
./util/scripts/install-gtest.sh;
fi
# for reference, display cmake and python version
- python -V
- cmake --version
- export nproc=2
# - pip install numpy
script:
# Build and install to CMake's default install path
- python -V
- mkdir build
- cd build
- if [ "$BUILD_DEPENDENCY_FROM_SOURCE" == "OFF" ]; then
cmake -DBUILD_SHARED_LIBS=$SHARED -DBUILD_UNIT_TESTS=ON ..;
else
cmake -DBUILD_SHARED_LIBS=$SHARED -DBUILD_UNIT_TESTS=ON -DBUILD_EIGEN3=ON
-DBUILD_GLEW=ON -DBUILD_GLFW=ON -DBUILD_JPEG=ON -DBUILD_JSONCPP=ON
-DBUILD_PNG=ON ..;
fi
# make -j brings 'virtual memory exhausted: Cannot allocate memory' message
# this is presumably due to limited memory space of travis-ci
# also set the time limit to 30 mins, this is a fix to issue #557
- travis_wait 30 sudo make install -j$nproc
- ./bin/unitTests
- test=`cmake --find-package -DNAME=Open3D -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST`
- if [ "$test" == "Open3D found." ]; then
echo "PASSED find_package(Open3D) in default install path.";
else
echo "FAILED find_package(Open3D) in default install path.";
exit 1;
fi
# Reconfig and install in a specified CMAKE_INSTALL_PREFIX
- sudo make uninstall
- if [ "$BUILD_DEPENDENCY_FROM_SOURCE" == "OFF" ]; then
cmake -DBUILD_SHARED_LIBS=$SHARED -DBUILD_UNIT_TESTS=ON
-DCMAKE_INSTALL_PREFIX=~/open3d_install ..;
else
cmake -DBUILD_SHARED_LIBS=$SHARED -DBUILD_UNIT_TESTS=ON -DBUILD_EIGEN3=ON
-DBUILD_GLEW=ON -DBUILD_GLFW=ON -DBUILD_JPEG=ON -DBUILD_JSONCPP=ON
-DBUILD_PNG=ON -DCMAKE_INSTALL_PREFIX=~/open3d_install ..;
fi
- travis_wait 30 sudo make install -j$nproc
- test=`cmake --find-package -DNAME=Open3D -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST
-DCMAKE_PREFIX_PATH="~/open3d_install/lib/cmake"`
- if [ "$test" == "Open3D found." ]; then
echo "PASSED find_package(Open3D) in specified install path.";
else
echo "FAILED find_package(Open3D) in specified install path.";
exit 1;
fi
# Test building example with installed Open3D
- cd ../docs/_static/C++
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=~/open3d_install ..
- make
- ./TestVisualizer
# The following script has issues on SHARED = "ON"
# - if [ "$SHARED" == "OFF" ]; then
# cd lib/Tutorial/Basic/ && python file_io.py
# fi