language: cpp dist: trusty sudo: required addons: apt: sources: - ubuntu-toolchain-r-test packages: - clang-3.6 - g++-4.8 - libpulse-dev - libasound2-dev - pulseaudio - doxygen - mingw-w64 - mingw-w64-tools env: global: - CMAKE_USE_ASAN=OFF matrix: include: - env: C_COMPILER=clang-3.6 CXX_COMPILER=clang++-3.6 - env: C_COMPILER=clang-3.6 CXX_COMPILER=clang++-3.6 CMAKE_USE_ASAN=ON - env: C_COMPILER=gcc-4.8 CXX_COMPILER=g++-4.8 - env: SCAN_BUILD=true - env: CROSS=mingw - env: CROSS=android API_LEVEL=android-15 - os: osx osx_image: xcode6.4 - os: osx env: SCAN_BUILD=true before_install: - if [[ -n $SCAN_BUILD ]]; then if [[ $TRAVIS_OS_NAME = "osx" ]]; then . scan-build-install.sh; else export SCAN_BUILD_PATH=/usr/share/clang/scan-build-3.6/scan-build; fi; export SCAN_BUILD_PATH="$SCAN_BUILD_PATH -o scan_results"; fi - if [[ $CROSS = "android" ]]; then NDK=android-ndk-r13b; curl -LO https://dl.google.com/android/repository/$NDK-linux-x86_64.zip; unzip -q $NDK-linux-x86_64.zip; rm $NDK-linux-x86_64.zip; export ANDROID_NDK=$(pwd)/$NDK; fi before_script: - if [[ -n $C_COMPILER ]]; then export CC=$C_COMPILER; fi - if [[ -n $CXX_COMPILER ]]; then export CXX=$CXX_COMPILER; fi - if [[ -n $CROSS ]]; then export TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-cross-$CROSS.cmake; fi - if [[ $CROSS = "android" ]]; then export TOOLCHAIN="$TOOLCHAIN -DANDROID_NATIVE_API_LEVEL=$API_LEVEL"; fi - mkdir build && cd build - $SCAN_BUILD_PATH cmake -DCMAKE_BUILD_TYPE=Debug -DSANITIZE_ADDRESS=$CMAKE_USE_ASAN $TOOLCHAIN ..; script: - $SCAN_BUILD_PATH cmake --build . - if [[ $TRAVIS_OS_NAME = "linux" && -z $CROSS ]]; then ctest -V; fi - if [[ -n $SCAN_BUILD ]]; then rmdir scan_results || ( echo "scan-build detected bugs!" && exit 1 ); fi