forked from Astron/Astron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (47 loc) · 1.8 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
language: cpp
os:
- linux
- osx
dist: trusty
sudo: required
osx_image: xcode9.3
compiler:
- clang
- gcc
services:
- mongodb
addons:
apt:
sources:
- mongodb-3.0-trusty
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
- cmake
- libboost-dev
- mongodb-org-server
- clang-5.0
- g++-6
- gcc-6
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew upgrade python;
brew update;
brew install mongodb;
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100
fi
install:
- OLD_PWD=$PWD
- cd ~/build && wget https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && tar xzf mongo-c-driver-1.13.0.tar.gz && cd mongo-c-driver-1.13.0 && cmake -DENABLE_ZLIB=BUNDLED -DENABLE_SSL=OFF . && make && sudo make install
- cd ~/build && wget https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz && tar xzf r3.4.0.tar.gz && cd mongo-cxx-driver-r3.4.0/build && cmake .. && make && make install && sudo cp -r install/* /usr/local
- cd ~/build && wget https://github.com/libuv/libuv/archive/v1.24.0.tar.gz && tar xzf v1.24.0.tar.gz && cd libuv-1.24.0 && sh autogen.sh && ./configure && make && sudo make install
- cd ~/build && wget https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.2.tar.gz && tar xzf yaml-cpp-0.6.2.tar.gz && cd yaml-cpp-yaml-cpp-0.6.2 && cmake . && make && sudo make install
- cd $OLD_PWD
script: cd build && cmake .. && make && env CTEST_OUTPUT_ON_FAILURE=1 make test