-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.travis.yml
More file actions
123 lines (112 loc) · 4.09 KB
/
.travis.yml
File metadata and controls
123 lines (112 loc) · 4.09 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
language: r
sudo: required
cache: packages
r:
- release
addons:
apt:
packages:
- libgsl0-dev
- libfribidi-dev
- r-cran-rjava
env:
global:
- _R_CHECK_TIMINGS_=0
- _R_CHECK_FORCE_SUGGESTS_=false # no error if suggested packs are not avail
- _R_CHECK_TESTS_NLINES_=999
warnings_are_errors: true
r_check_args: "--as-cran --run-donttest"
r_github_packages:
- jimhester/lintr@fe5de83b
- r-lib/covr
before_install:
# we want to see libpaths and installed packages from cache
- sudo $(which R) CMD javareconf
- Rscript -e 'message("LIBPATHS:"); .libPaths()'
- Rscript -e 'message("INSTALLED PACKS:"); installed.packages()[,2:3]'
before_script:
- rm inst/doc/*.*
- Rscript -e 'if (!require("roxygen2")) install.packages("roxygen2")'
- Rscript -e 'if (!require("pkgdown")) install.packages("pkgdown")'
- Rscript -e 'if (!require("devtools")) install.packages("devtools")'
- Rscript -e 'devtools::document()'
after_failure:
- ./travis-tool.sh dump_logs
stages:
- install
- test
- covr
- name: document
if: branch = master AND type IN (push, api, cron)
jobs:
include:
- stage: install
env: github-mlr
script:
# github mlr & tools
- Rscript -e 'devtools::install_github("berndbischl/BBmisc")'
- Rscript -e 'devtools::install_github("berndbischl/ParamHelpers")'
- Rscript -e 'devtools::install_github("mlr-org/mlr")'
- echo 'Filled the cache with installed R packages.'
- Rscript -e 'message("INSTALLED PACKS:"); installed.packages()[,2:3]'
- stage: install
env: cran-mlr
script:
# cran mlr & tools
- Rscript -e 'install.packages(c("BBmisc", "ParamHelpers", "mlr"))'
- echo 'Filled the cache with installed R packages.'
- Rscript -e 'message("INSTALLED PACKS:"); installed.packages()[,2:3]'
- stage: test
env: github-mlr
script:
- Rscript -e 'installed.packages()[c("BBmisc", "ParamHelpers", "mlr"), 2:3]'
- R CMD build .
- travis_wait 100 R CMD check mlrCPO*.tar.gz --as-cran --run-donttest
- grep -q -R "WARNING" "mlrCPO.Rcheck/00check.log" ; [ $? -ne 0 ]
- stage: test
env: cran-mlr
script:
- Rscript -e 'installed.packages()[c("BBmisc", "ParamHelpers", "mlr"), 2:3]'
- R CMD build .
- travis_wait 100 R CMD check mlrCPO*.tar.gz --as-cran --run-donttest
- grep -q -R "WARNING" "mlrCPO.Rcheck/00check.log" ; [ $? -ne 0 ]
- stage: covr
env: github-mlr
script:
- Rscript -e 'devtools::install_github("berndbischl/BBmisc")'
- Rscript -e 'devtools::install_github("berndbischl/ParamHelpers")'
- Rscript -e 'devtools::install_github("mlr-org/mlr")'
- travis_wait 100 Rscript -e 'library(BBmisc);covr::codecov(quiet=FALSE)'
- stage: document
env: cran-mlr
script:
- true
before_deploy:
- Rscript -e 'devtools::install(quick = TRUE); pkgdown::build_site(); devtools::document(); tools::buildVignettes(dir = ".");'
- mv vignettes/*.html inst/doc
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: docs
on:
branch: master
after_deploy:
- git checkout master # otherwise we're in detached head
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- git config user.name Travis
- git config user.email '<>'
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GITHUB_TOKEN}:@github.com" >> .git/credentials
- git config push.default matching
- |
git difftool -yx "diff -qI '20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\|environment. 0x\\|time. [0-9.]\\+'" | \
grep 'and inst/doc' | sed -e 's|.*and inst/doc|inst/doc|' -e 's/ differ$//' | xargs git add
- git add --force man/*
- git add DESCRIPTION NAMESPACE
- git commit -m "update auto-generated documentation [ci skip]" || true
- git push
on_success: change
on_failure: always
notifications:
email: false