forked from yihui/knitr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (54 loc) · 1.55 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
56
57
58
59
60
61
62
language: r
# environment variables
env:
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
# capturing state, early exit if no integration test is needed
before_install:
- export PATH=$HOME/texlive/bin/x86_64-linux:$PATH
- export RGL_USE_NULL=TRUE
- tlmgr update --all --self
- tlmgr conf texmf TEXMFHOME $(Rscript -e "cat(file.path(R.home('share'), 'texmf'))")
- 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
- "curl https://xran.yihui.name/.gitconfig -o ~/.gitconfig"
- Rscript -e 'update.packages(.libPaths()[1], ask = FALSE)'
- Rscript -e "if (!require('covr')) install.packages('covr')"
addons:
apt:
packages:
- ghc
- highlight
- optipng
- coffeescript
- asymptote
- graphviz
- scala
- qpdf
- texinfo
- cargo
- libmagick++-dev
- libpoppler-cpp-dev
- libglu1-mesa-dev
repos:
XRAN: https://xran.yihui.name
cache:
packages: yes
directories:
- $HOME/texlive
before_script:
- Rscript -e "if (!require('webshot')) devtools::install_github('wch/webshot')"
# run tests
script:
- rm knitr-examples/cache -rf
- make ${TARGET}
# deploy to xran after integration tests
after_success:
- "[ $TARGET = travis ] && Rscript -e 'covr::codecov()' || true"
- export R_PKG="$(basename $TRAVIS_REPO_SLUG)"
- "[ $TARGET = integration ] && (curl https://xran.yihui.name/r-xran | bash)"