git:
    depth: 5
branches:
    only:
      - master
language: c
sudo: required
os:
  - linux
  - osx
dist: trusty
compiler:
  - clang
  - gcc
addons:
    apt:
        packages:
          - llvm-dev
          - python
          - python-dev
          - python3
          - python3-dev
          - swig
          - gcc-multilib
matrix:
    include:
      - os: linux
        compiler: clang
        env: HOST=i686-linux-gnu
      - os: linux
        compiler: gcc
        env: HOST=i686-linux-gnu
      - compiler: gcc
        os: linux
        env: PYTHON_VERSION=3.4
      - compiler: clang
        os: linux
        env: DEBUG_WALLY=--enable-debug
      - compiler: clang
        os: linux
        env: ENABLE_ELEMENTS=--enable-elements

before_script:
  - ./tools/cleanup.sh && ./tools/autogen.sh
before_install:
  - ./tools/travis_install.sh
script:
  - ./tools/travis_build.sh
  - if [[ "$CC" == "clang" ]]; then ./tools/build_js_bindings.sh; fi
notifications:
    email: false
