language: c

branches:
  only:
    - master
    - topic_travis

os:
    - linux
    - osx

compiler:
    - gcc
    - clang

sudo: required
dist: trusty

addons:
 apt:
   sources:
   - ubuntu-toolchain-r-test
   packages:
   - gcc-6
   - g++-6
   - binutils
   - libtsan0
   - libasan3
   - liblsan0

cache:
  directories:
    - $HOME/install

env:
  global:
    - MERCURY_DASHBOARD_MODEL="Continuous"
    - MERCURY_NO_LOOP="true"
    - MERCURY_PORT_NAME='tcp://localhost:3344'
  matrix:
    - MERCURY_BUILD_CONFIGURATION="Debug"
    - MERCURY_BUILD_CONFIGURATION="RelWithDebInfo"
    - MERCURY_BUILD_CONFIGURATION="Release"
    - MERCURY_MEMORYCHECK_TYPE="ThreadSanitizer"

matrix:
  exclude:
   - os: osx
     env: MERCURY_MEMORYCHECK_TYPE="ThreadSanitizer"

branches:
  only:
    - master

before_install:
    - echo "Existing directories in $HOME" && ls $HOME

install:
    - ./Testing/script/travis_build.sh

before_script:
    - ls $HOME/install/bin
    - export PATH=$HOME/install/bin:$PATH
    - export LD_LIBRARY_PATH=$HOME/install/lib:$LD_LIBRARY_PATH
    - if [[ $TRAVIS_OS_NAME == 'linux' && $CC == 'gcc' ]]; then export CC=gcc-6; export CXX=g++-6; export LD=ld.bfd; $CC --version; $LD --version; $LD --help | grep push; fi
    - ctest --version

script:
    - ctest -VV --output-on-failure -S ./Testing/script/travis_script.cmake


language: c

os:
    - linux
    - osx

compiler:
    - gcc
    - clang

sudo: false

cache:
  directories:
    - $HOME/install

env:
  global:
    - MERCURY_DASHBOARD_MODEL="Continuous"
    - MERCURY_NO_LOOP="true"
    - MERCURY_PORT_NAME='tcp://localhost:3344'
  matrix:
    - MERCURY_BUILD_CONFIGURATION="Debug"
    - MERCURY_BUILD_CONFIGURATION="RelWithDebInfo"
    - MERCURY_BUILD_CONFIGURATION="Release"

branches:
  only:
    - master

before_install:
    - echo "Existing directories in $HOME" && ls $HOME

install:
    - ./Testing/script/travis_build.sh

before_script:
    - ls $HOME/install/bin
    - export PATH=$HOME/install/bin:$PATH
    - export LD_LIBRARY_PATH=$HOME/install/lib:$LD_LIBRARY_PATH
    - ctest --version

script:
    - ctest -VV --output-on-failure -S ./Testing/script/travis_script.cmake


Disable ThreadSanitizer in master branch for now
Disable ThreadSanitizer in master branch for now
