os:
- linux
# - osx
language: c
compiler:
- clang
- gcc
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
    sudo apt-get update -qq;
    sudo apt-get install -y autotools-dev pkg-config automake autoconf libtool;
    sudo apt-get install -y zlib1g-dev libxml2-dev;
  elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
    brew update > /dev/null;
    brew outdated autoconf || brew upgrade autoconf;
    brew outdated automake || brew upgrade automake;
    brew outdated libtool || brew upgrade libtool;
  fi
- git config --global user.name "Travis CI (libmobi)"
- git config --global user.email $HOSTNAME":not-for-mail@travis-ci.org"
script:
- ./autogen.sh
- ./configure --enable-debug && make && make test
- make clean
- ./configure --with-zlib=no --with-libxml2=no && make && make test

env:
  global:
  - secure: "ShIL3IDvH59cJx4QAKWhVTs7ynCAfID11DqK8pIWJX2UtvXc4pdDQUq6U5ZRLUT0BR6kmLNxYrQUpUKvZ9sYnPuj4X5o9jzXzXsJPXTy/qpjiLK4MCZLIlI4OAHexfAuZTOVZHOoE/B8ABpk8nGYUXk02++LxlmwtE/fIWOOWHs="

addons:
  coverity_scan:
    project:
      name: "bfabiszewski/libmobi"
      description: "Build submitted via Travis CI"
    notification_email: scan.coverity@fabiszewski.net
    build_command_prepend: "./autogen.sh && ./configure"
    build_command: "make -j 4"
    branch_pattern: public
