language: go
sudo: false
matrix:
  include:
    - go: 1.x
    - go: 1.11.x
    - go: 1.12.x
    - go: 1.13.x
      arch: amd64
    - name: "arch: arm64"
      go: 1.13.x
      arch: arm64
      env:
        - PYTHON_COMMAND=python3
    - name: "arch: i686"
      go: 1.13.x
      arch: amd64
      env:
        - PYTHON_COMMAND=python3
        - GOARCH=386
        - CGO_ENABLED=1
        - SKIP_PYTHON_BINDINGS_TESTS=1
    - name: "arch: ppc64le"
      go: 1.13.x
      arch: ppc64le
      env:
        - PYTHON_COMMAND=python3
    - go: tip
    - name: "Bazel Check"
      go: 1.x
      script: ./travisBazel.sh
      before_install:
        - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
        - curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
        - sudo apt-get update && sudo apt-get install bazel
    - name: "Make Check go 1.x"
      go: 1.x
      before_install:
        - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
        - curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
        - sudo apt-get update && sudo apt-get install bazel make
        - sudo apt install python3-dev
        - pip install -U pytest --user
      script: make all

before_install:
  - sudo apt install python3-dev
  - pip install -U pytest --user
  - go get github.com/axw/gocov/gocov
  - go get github.com/mattn/goveralls
  - go get github.com/fatih/color
  - go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
  - if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
  - go get github.com/sergi/go-diff/diffmatchpatch

script: ./travisBuild.sh

env:
  - PYTHON_COMMAND=python
