2016-05-13 31 views
0

我似乎就取決於一個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/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封裝的(主要研發包,數據包中同時它要求)都在GitHub 。

回答

0

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

這與更大的數據包中的一個進行罰款(聲明:我寫的

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

+0

所以你說主包不需要有一個說明'r_github_packages'的規範?我使用過,因爲主包依賴於另一個包(兩者都在github中) – warship

+0

在堅果殼中,是由於'devtools'''Remote:'關鍵字。有關使用方法,請參閱https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html – coatless

相關問題