sudo: false

language: cpp

matrix:
  include:
    - os: linux
      compiler: gcc
    - os: linux
      compiler: clang
    - os: linux
      compiler: gcc
      env: COVERALLS=true

before_script:
#ALWAYS analyze a project in its "debug" configuration
  - if [ "$CXX" == "clang++" ];
    then
      CC=clang-3.6 CXX=clang++-3.6 scan-build-3.6 cmake -DCMAKE_BUILD_TYPE=Debug .;
    elif [ "$COVERALLS" == "true" ];
    then
      echo "CHECKING CODE COVERAGE, $COVERALLS";
      cmake -Ccoveralls.cmake .;
    else
      cmake .;
    fi

script:
#Run the clang static analyzer.
  - if [ "$CXX" == "clang++" ];
    then
      CC=clang-3.6 CXX=clang++-3.6 scan-build-3.6 cmake --build .;
    else
      cmake --build .;
    fi
  - if [ "$COVERALLS" == "true" ];
    then
      make coveralls;
    else
      ctest --output-on-failure;
    fi
#  - make package # doesn't work on ubuntu

notifications:
  email:
    on_success: change
    on_failure: always

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
      - llvm-toolchain-precise-3.6
    packages:
      - clang-3.6
      - libboost-program-options-dev
      - libboost-date-time-dev

sudo: false

language: cpp

matrix:
  include:
    - os: linux
      compiler: gcc
    - os: linux
      compiler: clang
    - os: linux
      compiler: gcc
      env: COVERALLS=true

before_script:
#ALWAYS analyze a project in its "debug" configuration
  - if [ "$CXX" == "clang++" ];
    then
      CC=clang-3.6 CXX=clang++-3.6 scan-build-3.6 cmake -DCMAKE_BUILD_TYPE=Debug .;
    elif [ "$COVERALLS" == "true" ];
    then
      echo "CHECKING CODE COVERAGE, $COVERALLS";
      cmake -Ccoveralls.cmake .;
    else
      cmake .;
    fi

script:
#Run the clang static analyzer.
  - if [ "$CXX" == "clang++" ];
    then
      CC=clang-3.6 CXX=clang++-3.6 scan-build-3.6 cmake --build .;
    else
      cmake --build . -- -j 2;
    fi
  - if [ "$COVERALLS" == "true" ];
    then
      make coveralls -j 2;
    else
      ctest --output-on-failure;
    fi
#  - make package # doesn't work on ubuntu

notifications:
  email:
    on_success: change
    on_failure: always

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
      - llvm-toolchain-precise-3.6
    packages:
      - clang-3.6
      - libboost-program-options-dev
      - libboost-date-time-dev

Add number of cores to make
Add number of cores to make
