Skip to content

Commit d2e2f55

Browse files
authored
Merge pull request #894 from RcppCore/feature/travis_docker
Feature/travis docker
2 parents 112e5df + b42472d commit d2e2f55

File tree

4 files changed

+53
-19
lines changed

4 files changed

+53
-19
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ inst/include/Rcpp.h.old
1919
LICENSE
2020
.*.tar.gz
2121
\.editorconfig
22+
docker

.travis.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
# Run Travis CI for R using https://eddelbuettel.github.io/r-travis/
2-
3-
language: c
4-
5-
sudo: required
1+
# Run Travis CI for R via Docker
2+
#
3+
# Made by Dirk Eddelbuettel in August 2018 and released under GPL (>=2)
64

5+
os: linux
76
dist: trusty
7+
sudo: required
8+
services: docker
89

910
env:
1011
global:
11-
- RunAllRcppTests="yes"
12+
- DOCKER_OPTS="--rm -ti -v $(pwd):/mnt -w /mnt"
13+
DOCKER_CNTR="eddelbuettel/rcpp-testing"
14+
R_BLD_CHK_OPTS="--no-build-vignettes --no-manual"
1215

1316
before_install:
14-
- curl -OLs https://eddelbuettel.github.io/r-travis/run.sh && chmod 0755 run.sh
15-
# add our launchpad repo which has (inter alia) the r-cran-rbenchmark package
16-
- sudo add-apt-repository -y ppa:edd/misc
17-
- ./run.sh bootstrap
17+
- docker pull ${DOCKER_CNTR}
18+
- docker run ${DOCKER_OPTS} ${DOCKER_CNTR} r -p -e 'sessionInfo()'
1819

1920
install:
20-
- ./run.sh install_aptget r-cran-runit r-cran-inline r-cran-rbenchmark r-cran-rmarkdown r-cran-knitr r-cran-pinp r-cran-pkgkitten
21+
# Rcpp test runner can be forced to run more tests via this a variable
22+
- echo 'RunAllRcppTests="yes"' > ~/.Renviron
23+
#
24+
- docker run ${DOCKER_OPTS} ${DOCKER_CNTR} R CMD build ${R_BLD_CHK_OPTS} .
2125

22-
script:
23-
- ./run.sh run_tests
26+
script:
27+
- docker run ${DOCKER_OPTS} ${DOCKER_CNTR} R CMD check ${R_BLD_CHK_OPTS} Rcpp_*.tar.gz
2428

2529
after_success:
26-
- ./run.sh coverage
27-
28-
after_failure:
29-
- ./run.sh dump_logs
30+
- docker run ${DOCKER_OPTS} ${DOCKER_CNTR} r -l covr -e 'codecov()'
3031

3132
notifications:
3233
email:
3334
on_success: change
3435
on_failure: change
3536
slack:
3637
secure: kUzgzzpgBMc6a+qSjGovfU14U7x9GUXfghDgyF5qBaND/MjFpkmTBfW438Out2buiY+hFNnZc4zThifJM300cOXbcwVentmzuVQ5lLjBhTDvwQgdqytgWr/Ds9dErBeMXr178UD3MJXSOCLhO0wUke2xp2ZsDhsjquT+vFYnuk8=
37-
38-

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2018-08-29 Dirk Eddelbuettel <[email protected]>
2+
3+
* .travis.yml: Use Dockerfile
4+
5+
2018-08-28 Dirk Eddelbuettel <[email protected]>
6+
7+
* docker/Dockerfile: Add Dockerfile for use by Travis CI
8+
19
2018-08-27 Dirk Eddelbuettel <[email protected]>
210

311
* DESCRIPTION (Version, Date): Roll minor version

docker/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Emacs, make this -*- mode: sh; -*-
2+
3+
FROM r-base:latest
4+
5+
LABEL org.label-schema.license="GPL-2.0" \
6+
org.label-schema.vcs-url="https://github.com/RcppCore/Rcpp" \
7+
maintainer="Dirk Eddelbuettel <[email protected]>"
8+
9+
RUN apt-get update \
10+
&& apt-get install -y --no-install-recommends \
11+
r-cran-runit \
12+
r-cran-inline \
13+
r-cran-rmarkdown \
14+
r-cran-knitr \
15+
r-cran-pkgkitten \
16+
r-cran-curl \
17+
r-cran-openssl \
18+
r-cran-httr \
19+
r-cran-lazyeval \
20+
r-cran-withr \
21+
git \
22+
&& install.r rbenchmark pinp covr \
23+
&& mkdir ~/.R \
24+
&& echo _R_CHECK_FORCE_SUGGESTS_=FALSE > ~/.R/check.Renviron
25+
26+
CMD ["bash"]

0 commit comments

Comments
 (0)