This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
forked from datastax/cpp-driver
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
65 lines (65 loc) · 2.63 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
language: c++
sudo: false
compiler:
- clang
- gcc
addons:
apt:
packages:
- libssl-dev
- libssh2-1-dev
cache:
directories:
- ${HOME}/dependencies
env:
global:
- BOOST_VERSION=1.59.0
- BOOST_FILE_VERSION=1_59_0
matrix:
- LIBUV_VERSION=0.10.x EXACT_LIBUV_VERSION=0.10.36
- LIBUV_VERSION=1.x EXACT_LIBUV_VERSION=1.7.5
install:
- if [ ! -d "${HOME}/dependencies/libuv-${LIBUV_VERSION}" ]; then
wget -q http://dist.libuv.org/dist/v${EXACT_LIBUV_VERSION}/libuv-v${EXACT_LIBUV_VERSION}.tar.gz;
tar xzf libuv-v${EXACT_LIBUV_VERSION}.tar.gz;
cd libuv-v${EXACT_LIBUV_VERSION};
if [ "${LIBUV_VERSION}" == "0.10.x" ]; then
make -j2;
mkdir -p ${HOME}/dependencies/libuv-${LIBUV_VERSION}/lib;
cp libuv* ${HOME}/dependencies/libuv-${LIBUV_VERSION}/lib;
cp -r include ${HOME}/dependencies/libuv-${LIBUV_VERSION};
cd ${HOME}/dependencies/libuv-${LIBUV_VERSION}/lib;
ln -s libuv.so libuv.so.0.10;
cd - 2&> /dev/null;
fi;
if [ "${LIBUV_VERSION}" == "1.x" ]; then
sh autogen.sh;
./configure --prefix=${HOME}/dependencies/libuv-${LIBUV_VERSION};
make -j2 install;
fi;
cd - 2&> /dev/null
else echo "Using Cached libuv v${LIBUV_VERSION}. Dependency does not need to be re-compiled";
fi
- if [ ! -d "${HOME}/dependencies/boost_${BOOST_FILE_VERSION}" ]; then
wget -q http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_FILE_VERSION}.tar.gz/download -O boost_${BOOST_FILE_VERSION}.tar.gz;
tar xzf boost_${BOOST_FILE_VERSION}.tar.gz;
cd boost_${BOOST_FILE_VERSION};
./bootstrap.sh --with-libraries=atomic,chrono,date_time,log,program_options,random,system,thread,test --prefix=${HOME}/dependencies/boost_${BOOST_FILE_VERSION};
./b2 -j2 install;
cd - 2&> /dev/null;
else echo "Using Cached Boost v${BOOST_VERSION}. Dependency does not need to be re-compiled";
fi
- cd ${TRAVIS_BUILD_DIR}
before_script:
- EXTRA_CXX_FLAGS=
- EXTRA_C_FLAGS=
- USE_BOOST_ATOMIC=OFF
- if [ "$CXX" == "clang++" ]; then
EXTRA_CXX_FLAGS="-Wno-unknown-warning-option -Wno-gnu-folding-constant -Wno-sign-compare";
EXTRA_C_FLAGS="-Wno-unknown-warning-option";
USE_BOOST_ATOMIC=ON;
fi
- CFLAGS="${EXTRA_C_FLAGS}" CXXFLAGS="${EXTRA_CXX_FLAGS}" cmake -DBOOST_ROOT_DIR=${HOME}/dependencies/boost_${BOOST_FILE_VERSION} -DLIBUV_ROOT_DIR=${HOME}/dependencies/libuv-${LIBUV_VERSION}/ -DCASS_BUILD_STATIC=ON -DCASS_BUILD_EXAMPLES=ON -DCASS_BUILD_TESTS=ON -DCASS_USE_BOOST_ATOMIC=${USE_BOOST_ATOMIC} .
script:
- make -j2
- test/unit_tests/cassandra_unit_tests;