forked from c-ares/c-ares
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
114 lines (114 loc) · 3.81 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
language: c++
dist: trusty
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- cmake3
- lcov
- clang-5.0
- clang-tools-5.0
- valgrind
matrix:
include:
- os: linux
compiler: gcc
env: BUILD_TYPE=normal
- os: linux
compiler: clang
env: BUILD_TYPE=normal
- os: linux
compiler: gcc
env: BUILD_TYPE=cmake
- os: linux
compiler: clang
env: BUILD_TYPE=cmake
- os: linux
compiler: gcc
env: BUILD_TYPE=coverage
- os: linux
compiler: clang
env: BUILD_TYPE=ubsan
- os: linux
compiler: clang
env: BUILD_TYPE=asan
sudo: true # ASAN requires ptrace which is disabled in containers (https://github.com/travis-ci/travis-ci/issues/9033)
- os: linux
compiler: clang
env: BUILD_TYPE=lsan
sudo: true # LSAN requires ptrace which is disabled in containers (https://github.com/travis-ci/travis-ci/issues/9033)
- os: linux
compiler: clang
env: BUILD_TYPE=analyse
- os: linux
compiler: gcc
env: BUILD_TYPE=valgrind
- os: osx
compiler: gcc
env: BUILD_TYPE=normal
- os: osx
compiler: clang
env: BUILD_TYPE=normal
- os: osx
compiler: clang
env: BUILD_TYPE=cmake
- os: osx
compiler: clang
language: objective-c
env: BUILD_TYPE=ios
install:
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then pip install --user cpp-coveralls > /dev/null; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew reinstall libtool > /dev/null; fi
before_script:
- |
if [ "$BUILD_TYPE" = "coverage" ]; then
export CONFIG_OPTS="--enable-debug --disable-shared --enable-code-coverage"
fi
- |
if [ "$BUILD_TYPE" = "asan" ]; then
export CONFIG_OPTS=--enable-debug
export CFLAGS=-fsanitize=address
export CXXFLAGS=-fsanitize=address
export LDFLAGS=-fsanitize=address
fi
- |
if [ "$BUILD_TYPE" = "lsan" ]; then
export CONFIG_OPTS=--enable-debug
export CFLAGS=-fsanitize=leak
export CXXFLAGS=-fsanitize=leak
export LDFLAGS=-fsanitize=leak
fi
- |
if [ "$BUILD_TYPE" = "ubsan" ]; then
export CFLAGS="-fsanitize=undefined -fno-sanitize-recover"
export LDFLAGS="-fsanitize=undefined"
fi
- |
if [ "$BUILD_TYPE" = "analyse" ]; then
export SCAN_WRAP="scan-build-5.0 --status-bugs"
export CONFIG_OPTS="--enable-debug"
export CXX="clang++-5.0"
export CC="clang-5.0"
fi
- |
if [ "$BUILD_TYPE" = "valgrind" ]; then
export TEST_WRAP='libtool --mode=execute valgrind --leak-check=full'
# Skip container tests as valgrind doesn't cope with clone()
export TEST_FILTER="--gtest_filter=-*Container*"
fi
- |
if [ "$BUILD_TYPE" = "ios" ]; then
export CONFIG_OPTS=--host=arm-apple-darwin10
export DEVPATH=`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer
export IOSFLAGS="-isysroot $DEVPATH/SDKs/iPhoneOS.sdk -arch armv7 -miphoneos-version-min=8.0.0"
export CFLAGS=$IOSFLAGS
export CXXFLAGS=$IOSFLAGS
export LDFLAGS=$IOSFLAGS
fi
script:
- ./travis/build.sh && ./travis/test.sh
- if [ "$BUILD_TYPE" = "normal" ]; then ./travis/distcheck.sh ; fi
- if [ "$BUILD_TYPE" = "coverage" ]; then ./travis/covupload.sh ; fi