sudo: required
language: c
compiler: gcc

addons:
  apt:
    packages:
      - gcc-mingw-w64-i686
      - gcc-mingw-w64-x86-64
      - libcmocka-dev
      - rpm
      - valgrind

env:
  - TARGET=valgrind
  - TARGET=distcheck
  - TARGET=dist-srpm
  - TARGET=github-lambda
  - TARGET=make-embedded
  - TARGET=win32
  - TARGET=win64

matrix:
  include:
    - compiler: clang
      env: TARGET=valgrind
    - compiler: clang
      env: TARGET=distcheck
    - compiler: clang
      env: TARGET=distcheck
      os: osx

install: gem install ronn

before_script:
  - git fetch --unshallow
  - ./autogen.sh
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmocka; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install xz; fi

script:
  - ./.travis/build.sh
  - ./.travis/deploy.sh