language: c
dist: trusty

sudo: required

services:
  - docker

matrix:
  include:
    - os: osx
      env: OCAML_VERSION=4.05
    - os: osx
      env: OCAML_VERSION=4.06
    - os: osx
      env: OCAML_VERSION=4.07
    - os: osx
      env: OCAML_VERSION=4.08
    - os: osx
      env: OCAML_VERSION=4.09
    - os: linux
      env: TYPE=ubuntu-lts OCAML_VERSION=4.05
    - os: linux
      env: TYPE=ubuntu-lts OCAML_VERSION=4.06
    - os: linux
      env: TYPE=ubuntu-lts OCAML_VERSION=4.07
    - os: linux
      env: TYPE=ubuntu-lts OCAML_VERSION=4.08
    - os: linux
      env: TYPE=ubuntu-lts OCAML_VERSION=4.09
    - os: linux
      env: TYPE=ubuntu OCAML_VERSION=4.05
    - os: linux
      env: TYPE=ubuntu OCAML_VERSION=4.06
    - os: linux
      env: TYPE=ubuntu OCAML_VERSION=4.07
    - os: linux
      env: TYPE=ubuntu OCAML_VERSION=4.08
    - os: linux
      env: TYPE=ubuntu OCAML_VERSION=4.09
    - os: linux
      env: TYPE=debian-stable OCAML_VERSION=4.05
    - os: linux
      env: TYPE=debian-stable OCAML_VERSION=4.06
    - os: linux
      env: TYPE=debian-stable OCAML_VERSION=4.07
    - os: linux
      env: TYPE=debian-stable OCAML_VERSION=4.08
    - os: linux
      env: TYPE=debian-stable OCAML_VERSION=4.09
    - os: linux
      env: TYPE=centos OCAML_VERSION=4.05
    - os: linux
      env: TYPE=centos OCAML_VERSION=4.06
    - os: linux
      env: TYPE=centos OCAML_VERSION=4.07
    - os: linux
      env: TYPE=fedora OCAML_VERSION=4.05
    - os: linux
      env: TYPE=fedora OCAML_VERSION=4.06
    - os: linux
      env: TYPE=fedora OCAML_VERSION=4.07
    - os: linux
      env: TYPE=fedora OCAML_VERSION=4.08
    - os: linux
      env: TYPE=fedora OCAML_VERSION=4.09
  allow_failures:
    - os: osx

install:
  - source ./travis/install-deps

script:
  - bash ./travis/run-tests
