Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Caffe and Torch builds in Travis for 1 week #788

Merged
merged 2 commits into from
May 26, 2016

Conversation

lukeyeager
Copy link
Member

By removing the build time entirely, this brings the total TravisCI build+test time down from ~20 minutes to ~12 minutes when a cached build is present.

@@ -11,6 +11,13 @@ env:
global:
- NUM_THREADS=4

cache:
timeout: 10080 # 1 week
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to https://docs.travis-ci.com/user/caching/ the timeout is expressed in seconds and 10080s=2.8h. Am I not looking at the right doc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha whoops, sloppy math. Thanks!

@gheinrich
Copy link
Contributor

How do we handle the case where one build is started just before the timeout? And the case when the cache is empty and two jobs are started within minutes of each other? Maybe we don't want to handle these cases. Just curious.

@lukeyeager lukeyeager merged commit a1fff87 into NVIDIA:master May 26, 2016
@lukeyeager lukeyeager deleted the cache-travis-builds branch May 26, 2016 19:52
@lukeyeager
Copy link
Member Author

How do we handle the case where one build is started just before the timeout? And the case when the cache is empty and two jobs are started within minutes of each other? Maybe we don't want to handle these cases. Just curious.

From reading through the documentation, the cache is checked at the start of the build and uploaded at the end of the build (makes sense). So, if the cache is empty and two jobs start within a few minutes of each other, they'll both build and both upload a new cache (probably identical caches). It's a little wasteful, but I think it'll shake out in our favor overall.

I'm merging this now because I want to see how it behaves for a while. Then I can update BVLC's travis setup based on what I learn: BVLC/caffe#4207 (comment)

@lukeyeager
Copy link
Member Author

Woohoo it's working great! Build+test times are consistently about 12 minutes now.
https://travis-ci.org/NVIDIA/DIGITS/pull_requests

@lukeyeager lukeyeager added TravisCI and removed tests labels Jun 8, 2016
SlipknotTN pushed a commit to cynnyx/DIGITS that referenced this pull request Mar 30, 2017
Cache Caffe and Torch builds in Travis for 1 week
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants