我正在尝试设置 travis 构建,但失败并出现以下错误:
$ export PKG_TARBALL=$(Rscript -e 'pkg <- devtools::as.package("."); cat(paste0(pkg$package, "_", pkg$version, ".tar.gz"));')
Error in loadNamespace(name) : there is no package called ‘devtools’
我的包裹不需要devtools
编译。
我已经添加devtools
to Suggests:
in the DESCRIPTION
,将其添加到.travis.yml
(见下文)无济于事。
language: r
sudo: required
# System dependencies for HTTP calling
apt_packages:
- libcurl4-openssl-dev
- libxml2-dev
r_binary_packages:
- devtools
install:
- Rscript -e 'install.packages("INLA", repos="http://www.math.ntnu.no/inla/R/stable")'
我究竟做错了什么?
失败构建的日志文件:https://travis-ci.org/ThierryO/multimput/builds/97625211 https://travis-ci.org/ThierryO/multimput/builds/97625211
包来源:https://github.com/ThierryO/multimput/tree/travis https://github.com/ThierryO/multimput/tree/travis
我设法让它启动并运行.travis.yml
根据Travis CI 官方文档 https://docs.travis-ci.com/user/languages/r。该解决方案有几个组成部分:
- 手动安装开发工具
- 手动安装 CRAN 依赖项
- 手动安装 INLA
math.ntnu.no
and rstudio.com
存储库。第二个是必需的,因为第一个只有 INLA 包而没有它的依赖项。
构建日志 https://travis-ci.org/ThierryO/multimput/builds/97996845
.travis.yml
language: r
sudo: required
install:
- Rscript -e 'install.packages("devtools", repos = "http://cran.rstudio.com")'
- Rscript -e 'install.packages(c("plyr", "geepack", "snowfall"), repos = "http://cran.rstudio.com")'
- Rscript -e 'install.packages("INLA", repos = c("http://www.math.ntnu.no/inla/R/stable", "http://cran.rstudio.com"))'
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)