-
Notifications
You must be signed in to change notification settings - Fork 274
Use CCache to speed up build times in GitHub actions #5609
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
Use CCache to speed up build times in GitHub actions #5609
Conversation
c43a7b0
to
76dc705
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5609 +/- ##
========================================
Coverage 69.32% 69.32%
========================================
Files 1241 1241
Lines 100443 100443
========================================
Hits 69636 69636
Misses 30807 30807
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
d6fafc9
to
73c8dd5
Compare
e2d110b
to
fb5bb8c
Compare
FWIW, I am planning to do a separate PR to clean up the vs-2019-build-and-test configuration and, once done, also make it use clcache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me this looks good, but I'd be wary of merging something that's actively breaking CI, even if it promises to fix it later.
Also, this won't be able to be merged because the |
Have you checked if this has a measurable performance improvement in subsequent builds? EDIT NVM apparently it’s in the commit messages |
Looks like one java unit test is failing due to what looks like a pretty sketchy pretty function. Relies on a lot of platform specific behaviour which seems unnecessary. |
We used to do this on Travis and CodeBuild, let's also port this to GitHub actions. For any CMake builds, ccache will be used automatically if available (as of d953327). For Visual Studio, we'd need ccache/ccache#506 to be merged to use ccache. On Ubuntu runners and OSX runners, the build time of a rebuild without source code changes is down to under one minute (from 20 minutes).
ccache does not currently support msbuild, and we had successfully used clcache on CodeBuild before. Build times (of a fully cached rebuild) reduce from 34 minutes down to under 10 minutes.
fb5bb8c
to
1042403
Compare
Argh, this was fixed in #5613. I should have rebased this earlier today, my apologies. |
The issue with the test actually appears to be a long-standing issue with the |
+100, but #5613 was the quick way to stop the bleeding. |
It is worth noting that the total cache size for the whole repository is limited to 5GB. Source - https://github.com/actions/cache#cache-limits |
Yes, that's why I limited each job to 500 MB, I should perhaps have noted that in the commit message. GitHub also compresses the tar ball, making it around 50 MB it seems, so we can have quite a lot of cache keys before old ones are expired. |
We used to do this on Travis and CodeBuild, let's also port this to
GitHub actions.