Skip to content

Commit 18322ac

Browse files
author
Michael Fero
committed
Updating TravisCI from legacy to container-based infrastructure
1 parent 4169398 commit 18322ac

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

Diff for: .travis.yml

+33-22
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
language: c++
2+
sudo: false
23
compiler:
34
- clang
45
- gcc
6+
addons:
7+
apt:
8+
sources:
9+
- boost-latest
10+
packages:
11+
- libboost1.55-all-dev
12+
- libssl-dev
13+
- libssh2-1-dev
14+
cache:
15+
directories:
16+
- ${HOME}/dependencies
517
env:
618
matrix:
719
- LIBUV_VERSION=0.10.x EXACT_LIBUV_VERSION=0.10.36
8-
- LIBUV_VERSION=1.x EXACT_LIBUV_VERSION=1.7.4
9-
before_install:
10-
- sudo add-apt-repository ppa:boost-latest/ppa -y
11-
- sudo apt-get update -qq
12-
- sudo apt-get install libboost1.55-all-dev libssl-dev libssh2-1-dev -qq
13-
- wget -q http://dist.libuv.org/dist/v${EXACT_LIBUV_VERSION}/libuv-v${EXACT_LIBUV_VERSION}.tar.gz
20+
- LIBUV_VERSION=1.x EXACT_LIBUV_VERSION=1.7.5
1421
install:
15-
- tar xzf libuv-v${EXACT_LIBUV_VERSION}.tar.gz
16-
- cd libuv-v${EXACT_LIBUV_VERSION}
17-
- if [ "${LIBUV_VERSION}" == "0.10.x" ]; then
18-
make;
19-
mkdir -p ${PWD}/../lib/libuv-${LIBUV_VERSION}/lib;
20-
cp libuv* ${PWD}/../lib/libuv-${LIBUV_VERSION}/lib;
21-
cp -r include ${PWD}/../lib/libuv-${LIBUV_VERSION};
22-
cd ${PWD}/../lib/libuv-${LIBUV_VERSION}/lib;
23-
ln -s libuv.so libuv.so.0.10;
24-
fi
25-
- if [ "${LIBUV_VERSION}" == "1.x" ]; then
26-
sh autogen.sh;
27-
./configure --prefix=${PWD}/../lib/libuv-${LIBUV_VERSION};
28-
make -s install;
22+
- if [ ! -d "${HOME}/dependencies/libuv-${LIBUV_VERSION}" ]; then
23+
wget -q http://dist.libuv.org/dist/v${EXACT_LIBUV_VERSION}/libuv-v${EXACT_LIBUV_VERSION}.tar.gz;
24+
tar xzf libuv-v${EXACT_LIBUV_VERSION}.tar.gz;
25+
cd libuv-v${EXACT_LIBUV_VERSION};
26+
if [ "${LIBUV_VERSION}" == "0.10.x" ]; then
27+
make -j2;
28+
mkdir -p ${HOME}/dependencies/libuv-${LIBUV_VERSION}/lib;
29+
cp libuv* ${HOME}/dependencies/libuv-${LIBUV_VERSION}/lib;
30+
cp -r include ${HOME}/dependencies/libuv-${LIBUV_VERSION};
31+
cd ${HOME}/dependencies/libuv-${LIBUV_VERSION}/lib;
32+
ln -s libuv.so libuv.so.0.10;
33+
fi;
34+
if [ "${LIBUV_VERSION}" == "1.x" ]; then
35+
sh autogen.sh;
36+
./configure --prefix=${HOME}/dependencies/libuv-${LIBUV_VERSION};
37+
make -j2 install;
38+
fi;
39+
else echo "Using Cached libuv v${LIBUV_VERSION}. Dependency does not need to be re-compiled";
2940
fi
3041
- cd ${TRAVIS_BUILD_DIR}
3142
before_script:
@@ -37,9 +48,9 @@ before_script:
3748
BUILD_EXAMPLES=OFF;
3849
BUILD_TESTS=OFF;
3950
fi
40-
- CXXFLAGS="${EXTRA_CXX_FLAGS}" cmake -DLIBUV_ROOT_DIR=lib/libuv-${LIBUV_VERSION}/ -DCASS_BUILD_STATIC=ON -DCASS_BUILD_EXAMPLES=${BUILD_EXAMPLES} -DCASS_BUILD_TESTS=${BUILD_TESTS} .
51+
- CXXFLAGS="${EXTRA_CXX_FLAGS}" cmake -DLIBUV_ROOT_DIR=${HOME}/dependencies/libuv-${LIBUV_VERSION}/ -DCASS_BUILD_STATIC=ON -DCASS_BUILD_EXAMPLES=${BUILD_EXAMPLES} -DCASS_BUILD_TESTS=${BUILD_TESTS} .
4152
script:
42-
- make
53+
- make -j2
4354
- if [ "$CXX" != "clang++" ]; then
4455
test/unit_tests/cassandra_unit_tests;
4556
fi

0 commit comments

Comments
 (0)