forked from isl-org/Open3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
136 lines (123 loc) · 3.64 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
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 Sierra
# compiled using clang shipped with xcode8.3
- os: osx
osx_image: xcode8.3
- os: osx
osx_image: xcode8.3
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
brew install python;
./util/scripts/install-deps-osx.sh;
./util/scripts/install-gtest.sh;
fi
# for reference, display cmake and python version
- python -V
- cmake --version
# - pip install numpy
script:
# Build commands
- mkdir build
- cd build
- 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
# make -j brings 'virtual memory exhausted: Cannot allocate memory' message
# this is presumably due to limited memory space of travis-ci
- make install
- python -V
# The following script has issues on SHARED = "ON"
# - if [ "$SHARED" == "OFF" ]; then
# cd lib/Tutorial/Basic/ && python file_io.py
# fi
# test find_package(Open3D)
- 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)."; else echo "FAILED find_package(Open3D)."; exit 1; fi