From aceda7fbcb79f9c1601588eb0d16d796343cd159 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 11 Oct 2018 10:31:05 +0200 Subject: [PATCH] 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. --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index d9d641268..efe8dfb93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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