travis: enable caches

This commit sets the GOCACHE environment variable, and enables caching
on travis.

GOCACHE will tell the compiler (only go 1.10+) where to store build and
test artifacts. Caching this directory will significantly speed up
succeeding builds and test runs.

We also cache vendor/ as this will speed up the call to 'make dep'.

A few dependencies in the GOPATH are cached, as calls to 'go get' for
these will be sped up. Note that we don't cache the lnd directory, as it
will conflict with the changes in the PR being built.
This commit is contained in:
Johan T. Halseth 2018-10-11 10:31:05 +02:00
parent b4aeb83dbb
commit aceda7fbcb
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -1,8 +1,18 @@
language: go
cache:
directories:
- vendor/
- $GOCACHE
- $GOPATH/src/github.com/btcsuite
- $GOPATH/src/github.com/golang
- $GOPATH/src/gopkg.in/alecthomas
go:
- "1.11.x"
env:
global:
- GOCACHE=$HOME/.go-build
matrix:
- RACE=true LINT=true
- ITEST=true