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

speed up suggested / dep package installation #157

Open
berndbischl opened this issue Jun 12, 2015 · 1 comment
Open

speed up suggested / dep package installation #157

berndbischl opened this issue Jun 12, 2015 · 1 comment

Comments

@berndbischl
Copy link

Hi,

here at mlr we currently have a problem that our build takes too long.

https://travis-ci.org/berndbischl/mlr

We already inced the time limit to the max 50 minutes. But we quite often now hit that walltime, and more than 30 mins is spent just installing stuff.

We tried to use ubuntu binariers for some stuff instead, but this was a much worse option because the package versions were often much too old.

I currently have to start like every second build again, to randomly avoid the time barrier, and we are thinking about setting up our own CI server -- which at least I would like to avoid if there is no need.
But this is beginning to hurt.

Any hints? I mean most of this could be somehow cached right?

@berndbischl
Copy link
Author

Michel Lang @mllg solved this for us. Here is his email to me, posting it here for reference, as others having the same problem might find it helpful.

Here is our .yml
https://github.com/berndbischl/mlr/blob/master/.travis.yml

###############

I've convinced Travis to use binary packages from the cran2deb PPA
(https://launchpad.net/~marutter/+archive/ubuntu/c2d4u). A complete
travis build now takes around 20m, down from ~40m. I've simply copied
all packages from Imports and Suggests to the travis yaml. Some
packages are currently not available on the PPA (those are commented
out), others are outdated. To deal with outdated packages, I wrote a
small update-packages script specifically for travis (travis uses two
libraries and R does not support that in any useful way).

Summed up, this is the relevant part of what is going on on travis to
set up the check environment:

  1. Installation of R including base and recommended packages, plus
    some extra stuff like texlive and pandoc

  2. Installation of binary packages listed in r_binary_packages
    (including deps) to the system lib

  3. Installation of github packages listed in r_github_packages
    (including deps, if not already installed) to the user lib

  4. Installation of (additional) dependencies for mlr to the user lib
    via devtools::install_deps(). This also updates many packages
    (although the documentation does not feature this).

  5. Update of all packages found in the system lib (i.e. outdated
    binary packages) via
    https://github.com/mllg/travis-r-tools/blob/master/update-packages.r

  6. R CMD check.

If you introduce new dependencies in the future, please also add the
dependencies to the .travis.yml if there is a binary available.

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

1 participant