language: generic

env:
  - OCAML=4.02.3
  - OCAML=4.02.3+buckle-master
  - OCAML=4.03.0
  - OCAML=4.04.2
  - OCAML=4.05.0
  - OCAML=4.06.1
  - OCAML=4.07.0

before_script:
  - sudo add-apt-repository -y ppa:robert7/tidy-html5
  - sudo add-apt-repository -y ppa:avsm/ocaml42+opam12
  - sudo apt-get update
  - sudo apt-get install opam tidy
  - "opam init -y --compiler=$OCAML"
  - eval `opam config env`

script:
  - opam pin add -y --no-action odoc .
  - opam install -y --deps-only odoc
  - make test
  - opam pin add -y --dev-repo dune
  - make dune-test

notifications:
  email:
    recipients:
      - antonbachin@yahoo.com
    on_success: always
    on_failure: always

language: generic

env:
  - OCAML=4.02.3
  - OCAML=4.02.3+buckle-master
  - OCAML=4.03.0
  - OCAML=4.04.2
  - OCAML=4.05.0
  - OCAML=4.06.1
  - OCAML=4.07.0

before_script:
  - sudo add-apt-repository -y ppa:robert7/tidy-html5
  - sudo apt-get update
  - sudo apt-get install tidy
  - wget https://github.com/ocaml/opam/releases/download/2.0.0/opam-2.0.0-x86_64-linux
  - sudo mv opam-2.0.0-x86_64-linux /usr/local/bin/opam
  - sudo chmod a+x /usr/local/bin/opam
  - "opam init -y --compiler=$OCAML --disable-sandboxing"
  - eval `opam config env`
  - opam --version
  - ocaml -version

script:
  - opam pin add -y --no-action odoc .
  - opam install -y --deps-only odoc
  - make test
  - opam pin add -y --dev-repo dune
  - make dune-test

notifications:
  email:
    recipients:
      - antonbachin@yahoo.com
    on_success: always
    on_failure: always

Use opam 2 in Travis
Use opam 2 in Travis

opam 1.2 cannot access new packages, which are published only in the
opam 2 repo.
