R travis是否适用于大型数据包?

时间:2016-05-13 18:31:23

标签: r travis-ci

在依赖于90 Mb数据包的R包上使用R travis-ci时,我似乎遇到了内存分配问题(即从中获取数据的地方):< / p>

* installing *source* package ‘my_package’ ...
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in system2(file.path(R.home("bin"), "R"), c(if (nzchar(arch)) paste0("--arch=",  : 
  cannot popen ' '/home/travis/R-bin/lib/R/bin/R' --no-save --slave 2>&1 < '/tmp/RtmpGLG3uQ/file2f65432e469d'', probable reason 'Cannot allocate memory'
* removing ‘/home/travis/R/Library/my_package’
Warning in q("no", status = 1, runLast = FALSE) :
  system call failed: Cannot allocate memory
Error: Command failed (1)
Execution halted
The command "./travis-tool.sh github_package my_github_handle/my_package" failed and exited with 1 during .

Your build has been stopped.

是因为travis-ci不能处理这样的大型数据包,还是其他问题?

相关帖子:https://github.com/travis-ci/travis-ci/issues/5713https://github.com/travis-ci/travis-ci/issues/3656

这是我的travis.yml文件

language: r
cache: packages
warnings_are_errors: true
sudo: required
before_install:
 - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
 - chmod 755 ./travis-tool.sh
install:
 - ./travis-tool.sh aptget_install r-cran-xml
 - ./travis-tool.sh install_github hadley/devtools
 - ./travis-tool.sh install_deps
 - ./travis-tool.sh github_package my_github_handle/my_package
r_github_packages:
 - my_github_handle/my_package

请注意,我的两个R包(主要的R包和它需要的数据包)都在GitHub上。

1 个答案:

答案 0 :(得分:0)

不需要travis.yml的后半部分。使用:

language: r
cache: packages
warnings_are_errors: true
sudo: false

对于其他包依赖项,请使用devtools&#39; Remote: keyword in DESCRIPTION指定存储库或选择create your own repository并使用它(免责声明:我写过这篇文章)。

此设置下的Travis图像仅限于4 GB的RAM。有关VM构建信息的更多信息,请参阅:

https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments

这对一个较大的数据包表现良好(免责声明:我写了

https://travis-ci.org/SMAC-Group/imudata