-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
68 lines (57 loc) · 2.63 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
sudo: required
dist: trusty
language: cpp
notifications:
email:
on_success: change
on_failure: always
os:
- linux
- osx
compiler:
- clang
- gcc
env:
- BUILDTYPE=DEBUG
- BUILDTYPE=RELEASE
- BUILDTYPE=RELWITHDEBINFO
# - BUILDTYPE=ASAN # Address sanitizer
# - BUILDTYPE=UBSAN # Undefined-behaviour sanitizer
# - BUILDTYPE=ANALYZE # Use scan_build, which builds with Clang's static analyzer
matrix:
exclude:
# ATM, GCC doesn't implement the memory sanitizer
- compiler: gcc
env: BUILDTYPE=MSAN
# - compiler: gcc
# env: BUILDTYPE="ANALYZE"
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then sudo apt-get update -qq ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then sudo apt-get install -qq libc++-dev ; fi
install:
- if [ "$CXX" == "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9" ; fi
# - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.6" CC="clang-3.6" ; fi
- if [ "$CXX" == "clang++" ]; then export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -stdlib=libc++ " ; fi
- if [ "$BUILDTYPE" == "DEBUG" ]; then export CMAKE_BUILD_TYPE="DEBUG" ; export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" ; fi
- if [ "$BUILDTYPE" == "RELEASE" ]; then export CMAKE_BUILD_TYPE="RELEASE" ; export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" ; fi
- if [ "$BUILDTYPE" == "RELWITHDEBINFO" ]; then export CMAKE_BUILD_TYPE="RELWITHDEBINFO"; export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" ; fi
# - if [ "$BUILDTYPE" == "ASAN" ]; then export CMAKE_BUILD_TYPE="RELEASE" ; export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer"; fi
# - if [ "$BUILDTYPE" == "UBSAN" ]; then export CMAKE_BUILD_TYPE="RELEASE" ; export CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fsanitize=undefined "; fi
# - if [ "$BUILDTYPE" == "ANALYZE" ]; then export CMAKE_BUILD_TYPE="RELEASE" ; export WRAPPER="scan_build-3.6 " ; fi else export WRAPPER=" " ; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
# - kalakris-cmake
# - llvm-toolchain-precise-3.6
packages:
- g++-4.9
- gcc-4.9
# - clang-3.6
# - cmake
# - ninja-build
before_script:
- mkdir build && cd build
- cmake "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" ..
- cd $TRAVIS_BUILD_DIR
script: make -k -C build && build/build-test