Skip to content

Commit 074dddd

Browse files
authored
Add go-cache to the travis cache (#1767)
1 parent 924a297 commit 074dddd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ addons:
1212

1313
cache:
1414
directories:
15+
- "$HOME/.cache/go-build"
16+
- "$HOME/.cache/go-build-race"
1517
- "$HOME/google-cloud-sdk/"
1618
- "$HOME/gopath/pkg/mod"
1719

@@ -58,6 +60,10 @@ before_install:
5860
- sudo service mysql start
5961

6062
install:
63+
- |
64+
if [[ "${GOFLAGS}" == *-race* ]]; then
65+
export GOCACHE="$(go env GOCACHE)-race"
66+
fi
6167
- mkdir ../protoc
6268
- |
6369
(

0 commit comments

Comments
 (0)