language: cpp
matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
      compiler: gcc
    - os: linux
      dist: trusty
      sudo: required
      compiler: clang
    - os: osx
      osx_image: xcode7.3
      compiler: gcc
    - os: osx
      osx_image: xcode7.3
      compiler: clang
    - os: osx
      osx_image: xcode9
      compiler: gcc
    - os: osx
      osx_image: xcode9
      compiler: clang
env:
  - EXT_CXX_FLAGS="-fsanitize=address,leak -DDEBUG_MAP_GC" ASAN_OPTIONS="detect_odr_violation=0"
branches:
  only:
  - master
  - stage
before_install:
  - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update && sudo apt-get install -y libunittest++-dev; fi
  - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install unittest-cpp && brew uninstall cmake && brew install cmake; fi
  - if [ $TRAVIS_OS_NAME == osx ]; then export UNITTEST_INCLUDE_DIRS=/usr/local/Cellar/unittest-cpp/; fi
  - g++ --version
  - clang++ --version
  - java -version
install: cmake CMakeLists.txt
script: make && build/unitTests
after_script: rm -f *.hpl *.log

language: cpp
matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
      compiler: gcc
    - os: linux
      dist: trusty
      sudo: required
      compiler: clang
    - os: osx
      osx_image: xcode7.3
      compiler: gcc
    - os: osx
      osx_image: xcode7.3
      compiler: clang
    - os: osx
      osx_image: xcode9
      compiler: gcc
    - os: osx
      osx_image: xcode9
      compiler: clang
env:
  - EXT_CXX_FLAGS="-fsanitize=address -DDEBUG_MAP_GC" ASAN_OPTIONS="detect_odr_violation=0"
branches:
  only:
  - master
  - stage
before_install:
  - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update && sudo apt-get install -y libunittest++-dev; fi
  - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install unittest-cpp && brew uninstall cmake && brew install cmake; fi
  - if [ $TRAVIS_OS_NAME == osx ]; then export UNITTEST_INCLUDE_DIRS=/usr/local/Cellar/unittest-cpp/; fi
  - g++ --version
  - clang++ --version
  - java -version
install: cmake CMakeLists.txt
script: make && build/unitTests
after_script: rm -f *.hpl *.log

Remove sanitizer's leak flag since it's only supported on certain versions of clang
Remove sanitizer's leak flag since it's only supported on certain versions of clang