问题描述
我正在学习如何设置Travis CI。我有一个R包的小玩具示例:
https://github.com/AngryMaciek/badsoRts
我想将GitHub上的安装添加到Travis构建中:
.travis.yml
language: bash
os:
- linux
install:
- if [ "$TraviS_OS_NAME" = "linux" ]; then sudo apt update; fi
- if [ "$TraviS_OS_NAME" = "linux" ]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- if [ "$TraviS_OS_NAME" = "linux" ]; then sudo apt install r-base-core; fi
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
before_script:
- sudo R -e 'install.packages("devtools",repos="http://cran.us.r-project.org")'
script:
# install from the github repository
- sudo R -e 'library(devtools); install_github("angryMaciek/badsoRts")'
- sudo R -e 'library(badsoRts)'
# install from the anaconda cloud
- conda install -c angrymaciek badsorts
从 anaconda 安装效果很好,但是,我遇到了以下构建错误:
> library(devtools); install_github("angryMaciek/badsoRts")
Loading required package: usethis
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo angryMaciek/badsoRts@HEAD
Error: Failed to install 'badsoRts' from GitHub:
subscript out of bounds
Execution halted
The command "sudo R -e 'library(devtools); install_github("angryMaciek/badsoRts")'" exited with 1.
从GitHub进行手动安装在我的机器上运行良好,因此我认为这与Travis相关......
完整的Travis日志:https://travis-ci.org/github/AngryMaciek/badsoRts/builds/728061779
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)