Add go-mod cache for .travis to speed up builds (#7477)

master
Harshavardhana 6 years ago committed by Nitish Tiwari
parent 0188009c7e
commit 720ed3f5e8
  1. 9
      .travis.yml

@ -18,6 +18,14 @@ matrix:
- ARCH=x86_64 - ARCH=x86_64
- CGO_ENABLED=0 - CGO_ENABLED=0
- GO111MODULE=on - GO111MODULE=on
# Enable build cache
# https://restic.net/blog/2018-09-02/travis-build-cache
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
- $HOME/go/pkg/mod
go: 1.12.1 go: 1.12.1
script: script:
- make - make
@ -37,7 +45,6 @@ matrix:
go: 1.12.1 go: 1.12.1
script: script:
- go build --ldflags="$(go run buildscripts/gen-ldflags.go)" -o %GOPATH%\bin\minio.exe - go build --ldflags="$(go run buildscripts/gen-ldflags.go)" -o %GOPATH%\bin\minio.exe
- for d in $(go list ./... | grep -v browser); do CGO_ENABLED=1 go test -v -race --timeout 20m "$d"; done
- bash buildscripts/go-coverage.sh - bash buildscripts/go-coverage.sh
before_script: before_script:

Loading…
Cancel
Save