Skip to content

Commit 8f831da

Browse files
authored
.travis.yml: cache $HOME/.cache/go-build (#1068)
**Description of the change:** Cache the $HOME/.cache/go-build **Motivation for the change:** Significantly improve build speed for CI. In tests on my branch, the go and ansible CI tests increased in performance by ~4 minutes Initial Build (before cache was created): https://travis-ci.org/AlexNPavel/operator-sdk/builds/489678685 Cached Build: https://travis-ci.org/AlexNPavel/operator-sdk/builds/489690596 The way that cache works: CI checks if the current PR has a cache. If yes, use that. CI checks if target branch has cache. If yes, use that. CI checks if default branch (master) has cache. If yes, use that. This should improve build times for most builds, as all of our dependencies will now be precompiled and only sdk changes and linking will need to be done by CI.
1 parent 408edf4 commit 8f831da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: go
22
go_import_path: github.com/operator-framework/operator-sdk
33
sudo: required
44

5+
cache:
6+
directories:
7+
- $HOME/.cache/go-build
8+
59
go:
610
- 1.10.3
711

0 commit comments

Comments
 (0)