language: c

matrix:
  include:
    - os: linux
      compiler: gcc
      sudo: false
    - os: linux
      compiler: clang
      sudo: false

    - os: osx
      compiler: gcc
      before_install:
        - brew update --quiet >& /dev/null
        - brew outdated gcc || brew upgrade gcc
        - brew outdated cmake || brew upgrade cmake
        - brew install openmpi
    - os: osx
      compiler: clang
      before_install:
        - brew update --quiet >& /dev/null
        - brew outdated gcc || brew upgrade gcc
        - brew outdated cmake || brew upgrade cmake
        - brew install openmpi
    - os: osx
      compiler: gcc-5
      before_install:
        - brew update --quiet >& /dev/null
        - brew outdated gcc || brew upgrade gcc
        - export CC=gcc-5; export CXX=g++-5
        - brew outdated cmake || brew upgrade cmake
        - brew install openmpi


addons:
  apt:
    sources:
      - kalakris-cmake
    packages:
      - gfortran
      - cmake
      - libopenmpi-dev
      - openmpi-bin
      - binutils-dev


script:
  - mkdir travis && cd travis
  - cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=On -DSANITIZE_ADDRESS=On && make install && ctest --output-on-failure

after_success:
  - make -k gcov
  - bash <(curl -s https://codecov.io/bash) -X gcov

language: c

matrix:
  include:
    - os: linux
      compiler: gcc
      sudo: false
    - os: linux
      compiler: clang
      sudo: false

    - os: linux
      dist: trusty
      sudo: required
      compiler: gcc
    - os: linux
      dist: trusty
      sudo: required
      compiler: clang

    - os: osx
      compiler: gcc
      before_install:
        - brew update --quiet >& /dev/null
        - brew outdated gcc || brew upgrade gcc
        - brew outdated cmake || brew upgrade cmake
        - brew install openmpi
    - os: osx
      compiler: clang
      before_install:
        - brew update --quiet >& /dev/null
        - brew outdated gcc || brew upgrade gcc
        - brew outdated cmake || brew upgrade cmake
        - brew install openmpi
    - os: osx
      compiler: gcc-5
      before_install:
        - brew update --quiet >& /dev/null
        - brew outdated gcc || brew upgrade gcc
        - export CC=gcc-5; export CXX=g++-5
        - brew outdated cmake || brew upgrade cmake
        - brew install openmpi


addons:
  apt:
    sources:
      - kalakris-cmake
    packages:
      - gfortran
      - cmake
      - libopenmpi-dev
      - openmpi-bin
      - binutils-dev


script:
  - mkdir travis && cd travis
  - cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=On -DSANITIZE_ADDRESS=On && make install && ctest --output-on-failure

after_success:
  - make -k gcov
  - bash <(curl -s https://codecov.io/bash) -X gcov

Enable Trusty builds in Travis CI.
Enable Trusty builds in Travis CI.
