language: go
# Using sudo triggers a real virtual machine as opposed to a container, which
# allows ghw to actually determine things like host memory or block storage...
sudo: required
script:
  - source ./.get-go-packages.sh
  - go test -v $GO_PACKAGES
  - go run cmd/ghwc/main.go
env:
  - GHW_TESTING_SKIP_GPU=1
matrix:
  include:
    # On Go 1.10 and Go 1.11, use dep to ensure dependencies before running go
    # test.
    - os: linux
      go: "1.10"
      install:
        - go get -u github.com/golang/dep/cmd/dep
        - dep ensure -v
    - os: linux
      go: "1.11"
      install:
        - go get -u github.com/golang/dep/cmd/dep
        - dep ensure -v
    # On Go 1.12, use go modules to ensure dependencies instead of dep
    - os: linux
      go: "1.12"
      env: GO111MODULE=on
