forked from yihui/knitr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (52 loc) · 1.65 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
language: r
sudo: false
# environment variables
env:
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
global:
secure: AwMvWbAlUxA/SNmXpfm3zL7o5ohB2Qp/qyCrYdLRc8u9v6FBQAVq0NXghsN9NVCUiNO+unSr7qXj9JDcRyx6qj67nEzTM3Pcq1iEUAoWQyhDw9gyTls8wya2K4PG86b2yUAtVFkYBYDakjuTdo786Ili+Dsw4XP0PgtnuozCxuY=
# capturing state, early exit if no integration test is needed
before_install:
- export PATH=$HOME/texlive/bin/x86_64-linux:$PATH
- tlmgr update --self --all; mktexlsr
- 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
- "wget -q http://yihui.name/xran/.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
repos:
XRAN: http://yihui.name/xran
cache:
packages: yes
directories:
- $HOME/cache
before_script:
- Rscript -e "if (!require('webshot')) devtools::install_github('wch/webshot')"
# run tests
script:
- rm knitr-examples/cache -rf
- make ${TARGET}
- "[ $TARGET = travis ] && Rscript tools/covr.R || true"
# deploy to xran after integration tests
after_success:
- export R_PKG="$(basename $TRAVIS_REPO_SLUG)"
- "[ $TARGET = integration ] && (wget -q -O - http://yihui.name/xran/r-xran | bash)"