forked from yihui/knitr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (50 loc) · 1.9 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# it is not really python, but there is no R support on Travis CI yet
language: python
# environment variables
env:
global:
- R_LIBS_USER=~/R
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
# capturing state, early exit if no integration test is needed
before_install:
- env | sort
- if [ ${TARGET} = integration ]; then
if ! make integration-need; then
echo "NOTE:"" Integration test skipped. To enable, create a branch named ${TRAVIS_BRANCH} in ${TRAVIS_REPO_SLUG}-examples.";
exit 0;
fi;
fi
# install dependencies
install:
- echo "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/"
| sudo tee /etc/apt/sources.list.d/cran.list
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/cran.list"
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
- sudo apt-add-repository -y ppa:marutter/c2d4u
- sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/marutter-c2d4u-precise.list"
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
- sudo apt-get install r-base-dev r-cran-xml r-cran-rcurl r-cran-rgl r-recommended
- "[ ! -d ${R_LIBS_USER} ] && mkdir ${R_LIBS_USER}"
- R --version
- R -e '.libPaths(); sessionInfo()'
- Rscript -e 'install.packages("knitr", dep = TRUE, repos = c("http://rforge.net", "http://cran.rstudio.org"))'
# run tests
script:
- make ${TARGET}
# run check against R-devel
after_script:
- if [ ${TARGET} = travis ];
then
sudo add-apt-repository -y ppa:marutter/rdev;
sudo apt-get update
-o Dir::Etc::sourcelist="sources.list.d/marutter-rdev-precise.list"
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0";
sudo apt-get dist-upgrade;
make ${TARGET};
fi
- if [ ${TARGET} = integration ]; then
make integration-verify;
fi