forked from graeme-hill/crossguid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (67 loc) · 2.21 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
sudo: required
language: cpp
dist: trusty
matrix:
include:
- os: linux
addons: &gcc5
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
addons: &gcc6
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: osx
osx_image: xcode9.2
compiler: clang
- os: osx
osx_image: xcode8.3
compiler: clang
before_install:
# Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307)
# See https://github.com/searchivarius/nmslib/pull/259
- |
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -;
rvm get head || true
fi
script:
- export CHECKOUT_PATH=`pwd`;
- echo "ROOT_PATH= $ROOT_PATH"
- echo "CHECKOUT_PATH= $CHECKOUT_PATH"
#######################################################################################
# Install a recent CMake (unless already installed on OS X)
#######################################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
brew upgrade cmake || echo "suppress failures in order to ignore warnings"
brew link --overwrite cmake
fi
- cmake --version
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
sudo apt-get install uuid-dev
fi
#######################################################################################
# Build the library
#######################################################################################
- |
cd "${CHECKOUT_PATH}"
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE="Debug"
sudo make install
#######################################################################################
# Run the tests
#######################################################################################
- ./crossguid-test