language: go
sudo: required
go:
  - 1.8.x
  - 1.9.x
  - tip
os:
  - linux
  - osx
env:
  matrix:
    - GOARCH=amd64 DOCKER_PKG_VERSION=17.06.0~ce-0~ubuntu
    - GOARCH=386   DOCKER_PKG_VERSION=17.06.0~ce-0~ubuntu
    - GOARCH=amd64 DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
    - GOARCH=386   DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
  global:
    - GO_TEST_FLAGS=-race
    - DOCKER_HOST=tcp://127.0.0.1:2375
install:
  - make testdeps
  - travis_retry travis-scripts/install-docker.bash
script:
  - travis-scripts/run-tests.bash
services:
  - docker
matrix:
  fast_finish: true
  exclude:
    - os: osx
      env: GOARCH=amd64 DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
    - os: osx
      env: GOARCH=386   DOCKER_PKG_VERSION=17.05.0~ce-0~ubuntu-trusty
