language: c
compiler:
  - gcc
  - clang

os:
  - linux
  - osx

dist:
  - bionic

sudo: true

env:
  global:
    # COVERITY_SCAN_TOKEN
    - secure: "j58a3zOmHbWvKOfBaR2WJAU0Lz95M0u3Ji9NUn0Gj+v91z/vd0COF8dR6QO03V9fDms44ghBiUOblgfb8z/GFOaagn2FoHUrSka/Sju+gIFejgeSqwyxL3CjcX69M1f/npiePQDDtD5mb4dZTDZ4Nl3BpTqg+Qtar9/S/7LoheecWdd6kFDDMr+0yx3/nibwbC0+tpXftiB62tgaGwABQBvfQbgBXUxJ+0zaKXORiKmhwnEC15Bub0WmBhmZxahzlDMU2cEzxKVQbYrcf0TqZpbPhN7H42d3ssQJ3ogbqJmptZpoRdv9de6G0Hzq5QDLjkQxd+3z4hxRqOPzICoawkljQ6CF/JOSlqRXTP0/272MBHzgancQpQhO5yfB3eV4OFldQAdtIKHV04jQ9uSPYOi48To//HGOG8GOp6jFMrpKs6T6P8UiB+GTe57GjBdQI5uqZiEBMdc5MNaqDDoskdr+jTsnGJg6uY9ARrap3WFFEWiaTbe/wbE7+o0isb79PmgBzFLpcwpBFgfyQUiDb+e8S2d3ugKeIVlsSlrF7ZTXC40Y+qVwGzvf/RSM3+c9N/ikFmrLdzn0rBrwna4t3vPrBoU1seoCAZu5hwAU0+xNCN4P9M1s4tOnrG7Lq5URqkP0n9gTXvI8rQ7dDJibjP+5RoZUOd1XPkHbyN4Kseg="

script:
  - ./travis-configure.sh
  - if [[ "$COVERITY_SCAN_BRANCH" != 1 ]]; then make ; make test ; fi

before_install:
  - ./travis-install.sh


addons:
  coverity_scan:
    project:
      name: "eclipse/mosquitto"
      description: "Build submitted via Travis CI"
    notification_email: roger@atchoo.org
    build_command_prepend: ./travis-configure.sh
    build_command: "make binary -j 4"
    branch_pattern: coverity-.*
