language: c

os:
    - linux
    - osx

matrix:
    include:
        - os: linux
          dist: trusty
          sudo: required

compiler:
    - gcc
    - clang

addons:
  coverity_scan:
    project:
      name: "Comcast/trower-base64"
      description: " C implementation of base64 encode/decode."
    notification_email: weston_schmidt@alumni.purdue.edu
    build_command_prepend: "mkdir coverity_build && cd coverity_build && cmake .."
    build_command:   "make"
    branch_pattern: master

before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx"   ]]; then brew install cunit; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y -qq libcunit1 libcunit1-dev; fi

install:

script:
    - mkdir build
    - cd build
    - cmake ..
    - make
    - make test

after_success:
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash <(curl -s https://codecov.io/bash) -F unittests || echo "Codecov did not collect coverage reports"; fi

language: c

os:
    - linux
    - osx

matrix:
    include:
        - os: linux
          dist: trusty
          sudo: required

compiler:
    - gcc
    - clang

addons:
  coverity_scan:
    project:
      name: "Comcast/trower-base64"
      description: " C implementation of base64 encode/decode."
    notification_email: weston_schmidt@alumni.purdue.edu
    build_command_prepend: "mkdir coverity_build && cd coverity_build && cmake .."
    build_command:   "make"
    branch_pattern: coverity

before_install:
    - if [[ "$TRAVIS_OS_NAME" == "osx"   ]]; then brew install cunit; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y -qq libcunit1 libcunit1-dev; fi

install:

script:
    - mkdir build
    - cd build
    - cmake ..
    - make
    - make test

after_success:
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash <(curl -s https://codecov.io/bash) -F unittests || echo "Codecov did not collect coverage reports"; fi

Make coverity only active on that branch.
Make coverity only active on that branch.
