language: c
sudo: required

services:
        - docker

matrix:
  include:
    - env: TYPE=ubuntu
    - env: TYPE=alpine

before_install:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin

before_script:
  - docker-compose -f .travis/docker-compose-${TYPE}.yaml up -d --build

script:
  - docker-compose -f .travis/docker-compose-${TYPE}.yaml run ${TYPE} dune runtest --profile=release

after_script:
  - docker-compose -f .travis/docker-compose-${TYPE}.yaml down
