forked from mongodb/mongo-c-driver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
56 lines (44 loc) · 1.36 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
language: c
compiler:
- gcc
- clang
os:
- linux
- osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# https://github.com/Homebrew/homebrew-core/issues/26358
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink python; fi
# "brew install" can succeed but return 1 if it has "caveats".
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install mongodb || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start mongodb; fi
before_script:
# Add an IPv6 config - see the corresponding Travis issue
# https://github.com/travis-ci/travis-ci/issues/8361
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
fi
services: mongodb
env:
- CFLAGS="$CFLAGS -Werror -Wno-cast-align"
addons:
apt:
packages:
- gdb
script:
- sudo sh -c 'echo "\n::1 localhost\n" >> /etc/hosts'
- ulimit -a
- ulimit -c unlimited || true
- cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_MAINTAINER_FLAGS=ON -ENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .
- make -j 8
- make check
after_failure:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gdb; fi
- find /cores . -name \*core\* -exec ./.travis.scripts/debug-core.sh {} \;
# Exclude gcc on osx since it's just an alias for clang.
matrix:
exclude:
- compiler: gcc
os: osx
git:
depth: 20