2016-05-13 7 views
0

Ich scheine in eine Speicherzuweisung Problem zu laufen, wenn R travis-ci auf einem R-Paket verwenden, das auf einem 90 MB Datenpaket abhängig (dh, das ist, wo es seine Daten aus bekommt):Funktioniert R Travis an großen Datenpaketen?

* 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. 

Ist es, weil travis-ci funktioniert nicht mit großen Datenpaketen wie diesem oder ist es ein anderes Problem?

Related posts: https://github.com/travis-ci/travis-ci/issues/5713, https://github.com/travis-ci/travis-ci/issues/3656

Hier ist meine travis.yml Datei

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 

Beachten Sie, dass meine beiden R-Pakete (sowohl die Haupt-R-Paket und das Datenpaket erfordert) beide auf GitHub .

Antwort

0

Die spätere Hälfte der travis.yml wird nicht benötigt. Verwendung:

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

Für andere Paketabhängigkeiten devtools verwenden 'Remote: keyword in DESCRIPTION Repositories angeben oder sich dafür entscheiden, create your own repository und es verwenden (Disclaimer: Ich schrieb diesen Artikel).

Travis-Images in diesem Setup sind auf 4 GB RAM beschränkt. Weitere Informationen zu VM baut Informationen siehe:

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

Das mit einem der größeren Datenpakete in Ordnung führt (Disclaimer: Ich schrieb es)

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

+0

Sie sind also sagen, dass das Hauptpaket keine Spezifikation haben muss, die 'r_github_packages' sagt? Ich benutze das, weil das Hauptpaket von einem anderen Paket abhängt (und beide sind in GitHub) – warship

+0

In einer Nussschale, ja wegen 'Devtools' '' Remote: 'Schlüsselwort. Siehe https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html zur Verwendung – coatless