-
Notifications
You must be signed in to change notification settings - Fork 138
/
.travis.yml
69 lines (61 loc) · 2.14 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
sudo: required
language: cpp
dist: trusty
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: osx
osx_image: xcode9.2
compiler: clang
before_install:
# Make sure we set correct env for platform
- eval "$(MATRIX_EVAL)"
# 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