This repository has been archived by the owner on Dec 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (50 loc) · 2.03 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
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 deps
- Rscript -e 'install.packages(c("R6","data.table"), repos=c("https://cran.rstudio.com","https://Rdatatable.github.io/data.table"))'
# install suggests
- Rscript -e 'install.packages(c("microbenchmarkCore","knitr"), repos=c("https://cran.rstudio.com","https://olafmersmann.github.io/drat"))'
# build pkg
- 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"'/dtq", repo.cran=TRUE, log.files=paste0("tests/", c("test-dtl.Rout","test-dtq.log.Rout","test-dtq.Rout","test-read.only.Rout")))'
artifacts:
paths:
- public
test-r-3.2.0:
stage: test
image: docker.io/jangorecki/r-3.2.0
script:
# install deps
- R3script -e 'install.packages(c("R6","data.table"), repos="https://cran.rstudio.com", method="curl")'
# install suggests
- R3script -e 'install.packages(c("microbenchmarkCore","knitr"), repos=c("https://cran.rstudio.com","https://olafmersmann.github.io/drat"), method="curl")'
# build package
- R3 CMD build . --no-build-vignettes
# 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 --no-build-vignettes
# produce artifacts
- R3script -e 'install.packages("drat", repos="https://jangorecki.gitlab.io/drat", method="curl")'
- R3script -e 'drat::insertArtifacts(repodir="public/r-3.2.0", repo.url="'"$USERNS"'/dtq/r-3.2.0", repo.cran=TRUE, log.files=paste0("tests/", c("test-dtl.Rout","test-dtq.log.Rout","test-dtq.Rout","test-read.only.Rout")))'
artifacts:
paths:
- public
pages:
stage: deploy
image: docker.io/alpine
script:
- ls -lR public
artifacts:
paths:
- public