forked from mongodb/mongo-cxx-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (75 loc) · 2.97 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
85
86
87
88
89
90
91
92
93
94
95
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}"
- MONGO_ORCHESTRATION_REPO="git+git://github.com/mongodb/mongo-orchestration@master"
matrix:
- SANITIZE= DEBUG=
- SANITIZE= DEBUG=--dbg=on
- SANITIZE=--sanitize=address --llvm-symbolizer=llvm-symbolizer-3.4 DEBUG=--dbg=on
- SANITIZE=--sanitize=undefined DEBUG=--dbg=on
matrix:
exclude:
- compiler: gcc
env: SANITIZE=--sanitize=undefined 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
# Install Mongo Orchestration
- sudo pip install ${MONGO_ORCHESTRATION_REPO}
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
# Start Mongo Orchestration
- mongod --version
- sudo mongo-orchestration start
script:
# Test the driver
- scons $SCONS_FLAGS unit
- scons $SCONS_FLAGS integration
- scons $SCONS_FLAGS examples