You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
We don't seem to be caching dependencies in our Travis builds. It would probably help shorten build time if we could cache them and avoid having to download them every build.
The text was updated successfully, but these errors were encountered:
Gradle dependencies are not cached in Travis builds.
Consequently, the dependencies are re-downloaded in every build.
Let's teach Travis to cache Gradle dependencies using the recommended
configurations from Travis CI documentation [1].
In our experiments, when cache is not enabled, it takes 26.68 seconds
to run Gradle assemble task, which includes downloading Gradle and the
dependencies. When cache is enabled, Travis will tar up all the cached
directories and upload them to S3. So the cache is not network-local,
and the download time will be bound to network bandwidth and DNS
resolutions for S3. In the experiment, it takes 5.83 seconds to pull
down the cache from S3 and another 10.75 seconds to finish the assemble
task. At the end of the build, Travis will also check whether the cache
is updated. If it is, Travis will create a new archive and upload it to
S3. This check adds another 1.48 seconds overhead even when the cache
is not updated. So a rough estimate is that the build time will be
reduced by around 10 seconds when cache is enabled. Reasons for the
shorter build time now may be because Travis downloads the dependencies
from S3 in bulk instead of making multiple requests (one for each
dependency).
For more details on how caching works in Travis, please refer to [2].
[1] https://docs.travis-ci.com/user/languages/java/#Caching
[2] https://docs.travis-ci.com/user/caching/#How-does-caching-work
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We don't seem to be caching dependencies in our Travis builds. It would probably help shorten build time if we could cache them and avoid having to download them every build.
The text was updated successfully, but these errors were encountered: