I haven’t tried this before but I was thinking of ways to speed up builds of foreman and other projects I work on. CI builds take a long time just to download gems and I think we can easily improve this. Basically my idea is the following:
- create a simple task to use bundle package on a repo like foreman and then tar up the cache directory and place giant tar file on S3 or somewhere else.
- Perform a download of this tarball and extract to the vendor/cache directory during CI job
- run bundle install (uses cache directory instead of ruby gems.org)
- run rake test
Docs for using bundler packages
Now we could make this go even faster by storing the entire gemset package with all the compiled gems in a tar but it would be OS specific at this point and would need to provide many
os specific versions in a similar manner.
I am not sure what you guys are doing on your jenkins server but it sure would be nice to have this on travis.
It just seems silly to download the same things over and over and sometimes this takes 10-15 minutes. Additionally, I have seem some tests fail because one gem didn’t download correctly.
thoughts? Sounds pretty easy to implement, with the exception of who’s S3 account to store them on.