forked from Astron/Astron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (44 loc) · 1.73 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
language: cpp
os:
- linux
- osx
dist: trusty
sudo: required
osx_image: xcode8.3
compiler:
- clang
- gcc
services:
- mongodb
addons:
apt:
sources:
- mongodb-3.0-trusty
packages:
- cmake
- libboost-filesystem-dev
- libboost-regex-dev
- libboost-system-dev
- libboost-thread-dev
- libssl-dev
- libyaml-cpp-dev
- mongodb-org-server
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew outdated boost || brew upgrade boost;
brew upgrade openssl && export OPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2n/
brew install yaml-cpp;
brew install mongodb;
fi
install:
- OLD_PWD=$PWD
- cd ~/build && wget https://github.com/mongodb/libbson/releases/download/1.9.3/libbson-1.9.3.tar.gz && tar xzf libbson-1.9.3.tar.gz && cd libbson-1.9.3 && ./configure && make && sudo make install
- cd ~/build && wget https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz && tar xzf mongo-c-driver-1.9.3.tar.gz && cd mongo-c-driver-1.9.3 && ./configure && make && sudo make install
- cd ~/build && git clone https://github.com/mongodb/mongo-cxx-driver && cd mongo-cxx-driver/build && git checkout releases/stable && cmake .. && make && make install && sudo cp -r install/* /usr/local
- cd $OLD_PWD
# Workaround for https://svn.boost.org/trac/boost/ticket/7473
before_script:
- 'if [[ "$CXX" == "clang++" && "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install wget && sudo wget -O /usr/include/boost/config/stdlib/libstdcpp3.hpp https://raw.githubusercontent.com/boostorg/config/b36566fe04a89103b7ef5569c03e3a26eb77af36/include/boost/config/stdlib/libstdcpp3.hpp; fi'
script: cd build && cmake .. && make && env CTEST_OUTPUT_ON_FAILURE=1 make test