language: cpp

compiler:
  - clang
  - gcc

env:
  - BUILD_TYPE=Debug
  - BUILD_TYPE=Release
  global:
   # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
   #   via the "travis encrypt" command using the project repo's public key
   - secure: "AgUdoYPfLp2w5KoiG+dVwPPq60VMC8vfPDdEU7WgmsUK40eQedsyDf0Ba93lw23TMwUGnlBFtt5LYzUPESO1dgl6Dh/F9n6OSQfOlwTKI07hFQuWzdLYn6BWawOwhrzoMGH4HiNy+++vDWa/oog8EXkO5Qec8P7w4Ibd1GyXs1c="

install:
  - mkdir build
  - cd build
  - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTS=on -DBUILD_TESTS_WITH_EIGEN=on -DFORCE_DEPENDENCIES_BUILD=on ..
  - make

addons:
  coverity_scan:
    project:
      name: "kartikkumar/sml"
      description: "Build submitted via Travis CI"
    notification_email: me@kartikkumar.com
    build_command_prepend: ""
    build_command:   "make"
    branch_pattern: coverity_scan

script:
  - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then ctest -V ; fi

language: cpp

compiler:
  - clang
  - gcc

env:
  global:
   - secure: "V4NUAJrnSGb5lTKksAS+SoVuzN5v8XPs7VQ2PfACuYRM9gUs4DEEDKTeKtCX0nn0CgEtI5KlOcTWXeneVTQTP64qqaIP/s7HZ6LLjAZFSWHM5R8H4ThxUfFq17Ii8guvMKGVjPPlLGI+mrQ/E9dxzbgvKazaVyjxn9vr0Z8Bbas="
  matrix:
  - BUILD_TYPE=Debug
  - BUILD_TYPE=Release

addons:
  coverity_scan:
    project:
      name: "kartikkumar/sml"
    notification_email: me@kartikkumar.com
    build_command_prepend: "mkdir build; cd build; cmake -DBUILD_TESTS=on -DBUILD_TESTS_WITH_EIGEN=on -DFORCE_DEPENDENCIES_BUILD=on .."
    build_command:   "make; ctest -V"
    branch_pattern: coverity_scan

before_script:
  - mkdir build
  - cd build
  - cmake  -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTS=on -DBUILD_TESTS_WITH_EIGEN=on -DFORCE_DEPENDENCIES_BUILD=on ..

script:
  - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then make; ctest -V ; fi

Fix Travis script to work with Coverity.
Fix Travis script to work with Coverity.
