From 074dddd101bda32dd9c210dcc6ed52661df7480a Mon Sep 17 00:00:00 2001 From: Al Cutter Date: Thu, 11 Jul 2019 14:30:41 +0100 Subject: [PATCH] Add go-cache to the travis cache (#1767) --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8cc6f88a6a..bfd480fb8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ addons: cache: directories: + - "$HOME/.cache/go-build" + - "$HOME/.cache/go-build-race" - "$HOME/google-cloud-sdk/" - "$HOME/gopath/pkg/mod" @@ -58,6 +60,10 @@ before_install: - sudo service mysql start install: + - | + if [[ "${GOFLAGS}" == *-race* ]]; then + export GOCACHE="$(go env GOCACHE)-race" + fi - mkdir ../protoc - | (