dist: trusty
language: c

cache:
  directories:
  - $HOME/.opam

env:
  global:
  - OPAMJOBS="2"
  - OPAMYES="true"
  - OPAMVERBOSE="true"
  matrix:
  - OCAML_VERSION=4.07.1
  - OCAML_VERSION=4.08.1
  - OCAML_VERSION=4.09.1
  - OCAML_VERSION=4.10.1
  - OCAML_VERSION=4.11.1

os:
  - linux
#  - osx

before_install:
  # Obtain and install opam locally.
  - sudo wget https://github.com/ocaml/opam/releases/download/2.0.0/opam-2.0.0-x86_64-linux -O /usr/bin/opam
  - sudo chmod 755 /usr/bin/opam
  # Initialize the switch.
  - opam init -a --disable-sandboxing --compiler="$OCAML_VERSION"
  - opam update
  - opam switch "$OCAML_VERSION"
  - eval $(opam env)

script:
  - opam pin -t imagelib.dev .
  - make test

notifications:
  email:
    - rodolphe.lepigre@inria.fr
