r_package_binaries ignored?
markvanderloo opened this issue · comments
I'm trying to build a package on travis-ci. Before the actual build, I generate the Rd files using roxygen2 and devtools. However, even though I list both under r_binary_packages:
in my .travis.yml
, they seem to be ignored. Am I doing something wrong? Below is my .travis.yml
language: r
warnings_are_errors: true
r_binary_packages:
- roxygen2
- devtools
before_install:
- cp ./build/DESCRIPTION ./pkg
- R -q -f roxygen.R
- cd ./pkg
sudo: required
notifications:
email:
on_success: change
on_failure: change
I can do R -f try(install.pacackages())
and so on under before_install
but that seems a lot slower.
In case you're wondering: I prefer to generate documentation during the build process rather than adding the generated Rd files to my github repo. The generated files would pollute my github commit history with changes I did not make myself.
Thanks,
Mark
this one's just an oder or operations issue: we install everything in r_binary_packages
during the install
step.
would it work for you to use after_install
instead?
edit. Found what causes this. I did not realize that the to-be-built package deps are also installed during the install proces. Perhaps it is cleaner to move this to the build process actually (or if this mimics CRAN, the current way is probably better).
Thanks!
Now devtools seems to install, but I get the following error, before the installation process is completed:
The command "Rscript -e 'options(repos = "http://cran.rstudio.com"); tryCatch({ deps <- devtools::install_deps(dependencies = TRUE) }, error = function(e) { message(e); q(status=1) }); if (!all(deps %in% installed.packages())) { q(status = 1, save = "no") }'" failed and exited with 1 during .
Your build has been stopped.
Here's a link to the complete log: https://travis-ci.org/markvanderloo/stringdist/builds/66587913
Also, if I understand te log correctly, devtools is already installed by default so I could leave it out.
I'm closing this issue. I'm starting to understand the R/Travis-ci routine better and I'm pretty sure now that generating documentation as part of the build process is currently not possible since it depends on the .Rd files being there. Perhaps I'll open an issue on that at the travis community. Thanks so much again for your help!!