使用检查点和MRAN快照作为带有travis-ci的CRAN镜像



我想使用检查点包或MRAN快照库来设置当我的包在Travis-CI上构建时使用的包的版本。

我正在寻找关于这些工作的建议:

  1. Travis使用我的包所依赖的本地文件(即存储在我的pkg的github repo中)。例如,如果我使用检查点下载包的源代码并将它们存储在与我的包一起的目录中,我如何让Travis从该本地位置安装包,而不是从CRAN?或者,

  2. Travis使用MRAN快照URL下载在URL中设置的特定日期存档的包。

我一直在试验。travis的各种选项。这个测试包中的Yml文件:https://github.com/benmarwick/checkpointtest

例如,这里有.travis。我尝试过的yml文件:

# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: R
sudo: false
cache: packages
warnings_are_errors: false
cran: https://mran.revolutionanalytics.com/

# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: R
sudo: false
cache: packages
warnings_are_errors: false
repos:
  CRAN: https://mran.revolutionanalytics.com/snapshot/2016-09-02

# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: R
sudo: false
cache: packages
cran: https://mran.revolutionanalytics.com/snapshot/2016-09-02
env:
  global:
  - R_LIBS_USER=~/vignettes/packages/.checkpoint/2016-09-02/lib/x86_64-w64-mingw32/3.3.1
  - R_LIBS_SITE=~/vignettes/packages/.checkpoint/2016-09-02/lib/x86_64-w64-mingw32/3.3.1

和其他几个组合。

到目前为止,一切都导致了一个错误(https://travis-ci.org/benmarwick/checkpointtest),通常这是错误消息:

W: Failed to fetch https://mran.revolutionanalytics.com//bin/linux/ubuntu/precise/Packages server certificate verification failed.
 CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

我如何让Travis-CI知道检查点包,而不联系CRAN下载依赖项?

这个问题与我关于让Travis使用非cran包源的packrat问题有关。

这似乎可以工作:

# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
language: R
sudo: false
cache:
  packages: true
repos:
  MRAN: "https://mran.microsoft.com/snapshot/2016-11-08"
warnings_are_errors: false

最新更新