R travis是否适用于大型数据包?
问题描述:
我似乎就取决于一个90 MB的数据包的R包,使用R travis-ci
当运行到内存分配问题(即,这就是它从获取数据):R travis是否适用于大型数据包?
* 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/5713,https://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封装的(主要研发包,数据包中同时它要求)都在GitHub 。
答
travis.yml
的后半部分是不需要的。用途:
language: r
cache: packages
warnings_are_errors: true
sudo: false
对于其他软件包的依赖使用devtools
'Remote:
keyword in DESCRIPTION
指定仓库或选择create your own repository,并用它(免责声明:我写这篇文章)。
在此设置下的Travis图像仅限于4 GB的RAM。有关虚拟机的更多信息构建信息,请参阅:
https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
这与更大的数据包中的一个进行罚款(声明:我写的)
所以你说主包不需要有一个说明'r_github_packages'的规范?我使用过,因为主包依赖于另一个包(两者都在github中) – warship
在坚果壳中,是由于'devtools'''Remote:'关键字。有关使用方法,请参阅https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html – coatless