dist: xenial
language: c
sudo: false

addons:
  apt:
    packages:
    - aspcud
    - libglpk-dev

before_install:
    - bash -exu .travis-ci.sh prepare
install:
    - bash -exu .travis-ci.sh install

cache:
    directories:
    - $HOME/.opam.cached
    - $HOME/local
    - $HOME/opam1.2/cache

script:
    - bash -exu .travis-ci.sh build

env:
  global:
  - OPAMBSVERSION=2.0.7

jobs:
  include:
    - os: linux
      env: OCAML_VERSION=4.02.3
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.03.0
      stage: Build
    - os: osx
      env: OCAML_VERSION=4.03.0
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.04.2
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.05.0
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.06.1
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.07.1
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.08.1
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.09.1
      stage: Build
    - os: linux
      env: OCAML_VERSION=4.10.0
      stage: Build
    - os: linux
      stage: Hygiene
    - os: osx
      env: OCAML_VERSION=4.09.1 OPAM_TEST=1
      stage: Test
    - os: linux
      env: OCAML_VERSION=4.09.1 OPAM_TEST=1
      stage: Test
    - os: linux
      env: OCAML_VERSION=4.09.1 OPAM_TEST=1 EXTERNAL_SOLVER=aspcud
      stage: Test
    - os: linux
      env: COLD=1
      stage: Test
    - os: linux
      env: OCAML_VERSION=4.09.1
      stage: Upgrade

notifications:
  email:
    - opam-commits@lists.ocaml.org
  irc:
    - "chat.freenode.net#opam"
