forked from Rdatatable/data.table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
89 lines (83 loc) · 3.12 KB
/
.gitlab-ci.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
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
variables:
USERNS: "https://jangorecki.gitlab.io" # user namespace for local fork drat install string
stages:
- test
- deploy
test:
stage: test
image: docker.io/jangorecki/r-pkg
script:
# install suggests
- Rscript -e 'install.packages(c("chron", "ggplot2", "plyr", "reshape", "reshape2", "testthat", "hexbin", "fastmatch", "nlme", "xts", "bit64", "gdata", "caret", "knitr", "curl", "zoo", "plm", "rmarkdown"))'
- Rscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("GenomicRanges")'
# add git commit hash metadata
- echo "Commit:" $CI_BUILD_REF >> ./DESCRIPTION
# build package
- R CMD build .
# run check
- R CMD check $(ls -1t *.tar.gz | head -n 1) --no-manual --as-cran
# produce artifacts
- Rscript -e 'drat::insertArtifacts(repodir="public", repo.url="'"$USERNS"'/data.table", log.files=c("tests/tests.Rout"))'
artifacts:
paths:
- public
test-vanilla:
stage: test
image: docker.io/jangorecki/r-base-dev
script:
# build package
- R CMD build . --no-build-vignettes
# run check
- export _R_CHECK_CRAN_INCOMING_=FALSE
- export _R_CHECK_FORCE_SUGGESTS_=FALSE
- R CMD check $(ls -1t *.tar.gz | head -n 1) --ignore-vignettes --no-manual --as-cran
# produce artifacts
- Rscript -e 'install.packages("drat", repos="https://jangorecki.gitlab.io/drat")'
- Rscript -e 'drat::insertArtifacts(repodir="public/vanilla", repo.url="'"$USERNS"'/data.table/vanilla", log.files=c("tests/tests.Rout"))'
artifacts:
paths:
- public
test-r-devel:
stage: test
image: docker.io/jangorecki/drd-pkg
script:
# install suggests
- RDscript -e 'install.packages(c("chron", "ggplot2", "plyr", "reshape", "reshape2", "testthat", "hexbin", "fastmatch", "nlme", "xts", "bit64", "gdata", "caret", "knitr", "curl", "zoo", "plm", "rmarkdown"))'
- RDscript -e 'source("https://bioconductor.org/biocLite.R"); biocLite("GenomicRanges")'
# build package
- RD CMD build .
# Some suggested deps might fail to install on R-devel
- export _R_CHECK_FORCE_SUGGESTS_=FALSE
# run check
- RD CMD check $(ls -1t *.tar.gz | head -n 1) --no-manual --as-cran
# produce artifacts
- RDscript -e '.libPaths(setdiff(.libPaths(), "/usr/lib/R/library")); drat::insertArtifacts(repodir="public/r-devel", repo.url="'"$USERNS"'/data.table/r-devel", log.files=c("tests/tests.Rout"))'
artifacts:
paths:
- public
test-r-3.0.0:
stage: test
image: docker.io/jangorecki/r-3.0.0
script:
# build package
- R3 CMD build .
# run check
- export _R_CHECK_CRAN_INCOMING_=FALSE
- export _R_CHECK_FORCE_SUGGESTS_=FALSE
- R3 CMD check $(ls -1t *.tar.gz | head -n 1) --no-manual --as-cran
# produce artifacts
- R3script -e 'install.packages("drat", repos="https://jangorecki.gitlab.io/drat", method="curl")'
- R3script -e 'drat::insertArtifacts(repodir="public/r-3.0.0", repo.url="'"$USERNS"'/data.table/r-3.0.0", log.files=c("tests/tests.Rout"))'
artifacts:
paths:
- public
pages:
only:
- master
stage: deploy
image: docker.io/alpine
script:
- ls -lR public
artifacts:
paths:
- public