travis-ci R建议包

时间:2015-03-21 01:17:37

标签: r travis-ci devtools

在我的R包中,我提供了一些我在示例中使用的建议包。如ROracle,RPostgreSQL,RODBC。将它们保留在建议允许跳过对它们的测试,但它似乎不适用于travis-ci - 最近language: r

我尝试了多个案例:
env: _R_CHECK_FORCE_SUGGESTS_=false

env: global: - _R_CHECK_FORCE_SUGGESTS_=false

没有任何帮助,我的包试图安装建议的包除了我设置的选项,并导致生成错误。种类:

** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: error: OCI libraries not found
ERROR: configuration failed for package ‘ROracle’
1: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) :
  installation of package ‘RODBC’ had non-zero exit status
2: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) :
  installation of package ‘ROracle’ had non-zero exit status
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.

避免安装postgres,oracle,odbc以及仍使用原生travis的任何简单方法都可以吗?

1 个答案:

答案 0 :(得分:7)

在R本身已经改变了一段时间,而Suggests:中的包现在需要在运行R CMD check时出现。以前的总痛苦,但它是......

现在,对于其中两个,你可以做得很幸运

install_aptget r-cran-rodbc r-cran-rpostgresql 

但对于ROracle,您必须从源代码安装软件包(或更改您的Suggests:)。