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

Use container based builds by default? #143

Open
hadley opened this issue Dec 17, 2014 · 7 comments
Open

Use container based builds by default? #143

hadley opened this issue Dec 17, 2014 · 7 comments

Comments

@hadley
Copy link
Contributor

hadley commented Dec 17, 2014

  • sudo: false
  • Figure out how to take advantage of caching
@gaborcsardi
Copy link

Yeah, I was thinking about that, too. Not easy, though, because you cannot do apt-get install without sudo.....

I guess once R is a first class language on Travis-CI, this problem largely goes away, so it might not be worth "fixing" the current r-travis.

@hadley
Copy link
Contributor Author

hadley commented Dec 17, 2014

@gaborcsardi we should be working on getting R to be a first class language then!

@gaborcsardi
Copy link

@hadley, Yep, @craigcitro will do that soon: https://twitter.com/GaborCsardi/status/542712472155983873

FWIW, I have binary builds for many R versions and R-devel (hourly) at https://github.com/metacran/r-builder/releases

Using these it is easier to get rid of sudo, the bigger pieces still installed by apt-get are TeX, qpdf and gfortran: https://github.com/metacran/r-builder/blob/master/pkg-build.sh

TeX is a really a beast, but I guess we can just pull this from a binary as well, and then cache it. @krlmlr worked on this if I remember well.

I am kind of ambivalent about caching, btw., it makes the build much faster, but it also introduces a lot of potential errors if you do not start from a clean state. Anyway, caching tex, gfortran, etc. is probably fine. Maybe the R binaries are also fine. Caching the R library directory is more risky imho.

@krlmlr
Copy link
Contributor

krlmlr commented Dec 17, 2014

I have prepared both R and TeXlive binaries in two GitHub repos for running on Snap CI, but this is CentOS. It should be easy to port these to Travis/Ubuntu. gfortran and qpdf can be provided in a similar fashion.

To take advantage of the cache, there needs to be some mechanism to detect that the cached binaries are out of date. Git offers this -- if R or TeXlive are already cached, a simple git pull suffices to get the latest updates with minimal overhead. That's the reason why the stuff is in a GitHub repo and not in an archive. Perhaps there are better ways to achieve this, but this now works for me well enough for quite some time.

@gaborcsardi
Copy link

@krlmlr I think the git repo is elegant, but it might be overkill. Unless you prune older files, it will be huge soon, because you are storing binaries. (I guess, I might be wrong.) I am also not sure about Github's policy about storing essentially binaries in the repos....

An alternative solution is simply using a hash. The hash of the tarball can be included in the file name, and then if it is newer than the cached version, then we can download it.

@hadley
Copy link
Contributor Author

hadley commented Dec 17, 2014

I think the cache will be most important for r packages, as other big dependencies should be included in top level language support.

@gaborcsardi is right that it's easy to cause a lot of problems with caching, so it probably shouldn't be the default. But it will be useful for packages with many deps like dplyr and devtools.

@gaborcsardi
Copy link

I think the cache will be most important for r packages, as other big dependencies should be included in top level language support.

Ideally yes. But if Travis keeps relying on Ubuntu 12.x, then we need to install a newer TexLive, which might not be possible at the top level. Anyway, this is too speculative. We'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants