forked from mongodb/mongo-cxx-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (67 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
language: cpp
compiler:
- gcc
- clang
env:
global:
- MONGO_REPO="http://repo.mongodb.com/apt/ubuntu"
- REPO_TYPE="precise/mongodb-enterprise/2.6 multiverse"
- SOURCES_LOC="/etc/apt/sources.list.d/mongodb-enterprise.list"
- KEY_SERVER="hkp://keyserver.ubuntu.com:80"
- MONGOD_PARAMS="--setParameter=enableTestCommands=1"
- MONGOD_OPTS="--port 27999 --httpinterface --dbpath ./data --fork --logpath mongod.log ${MONGOD_PARAMS}"
matrix:
- SANITIZE= DEBUG=
- SANITIZE= DEBUG=--dbg=on
- SANITIZE=--sanitize=address,leak --llvm-symbolizer=llvm-symbolizer-3.4 DEBUG=--dbg=on
# Setup required repositories before installation
before_install:
# GCC 4.8.1
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
# Clang 3.4
- if [ "$CXX" == "clang++" ]; then sudo add-apt-repository -y ppa:h-rayflood/llvm; fi
# Boost 1.49
- sudo add-apt-repository -y ppa:jkeiren/ppa
# MongoDB Enterprise Edition 2.6
- sudo apt-key adv --keyserver ${KEY_SERVER} --recv 7F0CEB10
- echo "deb ${MONGO_REPO} ${REPO_TYPE}" | sudo tee ${SOURCES_LOC}
# Update all the repositories
- sudo apt-get update -qq
install:
# GCC 4.8.1
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; export CC="gcc-4.8"; fi
# Clang 3.4
- if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.4; fi
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; export CC="clang-3.4"; fi
# Install Boost 1.49 dependencies via PPA
- sudo apt-get install -qq
libboost1.49-dev
libboost-program-options1.49-dev
libboost-filesystem1.49-dev
libboost-thread1.49-dev
libboost-regex1.49-dev
# Install MongoDB Enterprise and let smoke drive
- sudo apt-get install mongodb-enterprise-server
- sudo stop mongod
- mkdir data
- mongod ${MONGOD_OPTS}
before_script:
# Set SCONS_FLAGS based on new $CXX and $CC
- $CXX --version
- export GTEST_PARAMS="--gtest-filter=-SASL*"
- export SCONS_CONCURRENCY_FLAG="-j3"
- export SCONS_FLAGS="--mute --ssl --use-sasl-client $GTEST_PARAMS --cxx=$CXX --cc=$CC $DEBUG $SANITIZE"
# run lint
- scons $SCONS_FLAGS lint
# Build all targets
- scons $SCONS_FLAGS $SCONS_CONCURRENCY_FLAG all
# Install the driver
- scons $SCONS_FLAGS $SCONS_CONCURRENCY_FLAG install
# Check the installation
- scons $SCONS_FLAGS check-install
script:
# Test the driver
- scons $SCONS_FLAGS unit
- scons $SCONS_FLAGS integration
- scons $SCONS_FLAGS examples