This repository has been archived by the owner on Jul 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.gitlab-ci.yml
195 lines (187 loc) · 7.3 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
variables:
CRAN_MIRROR: "https://cloud.r-project.org"
_R_CHECK_CRAN_INCOMING_: "FALSE" # unlike CRAN
_R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE" # unlike CRAN
_R_CHECK_VC_DIRS_: "TRUE"
_R_CHECK_TIMINGS_: "10"
_R_CHECK_INSTALL_DEPENDS_: "TRUE"
_R_CHECK_SUGGESTS_ONLY_: "TRUE"
_R_CHECK_NO_RECOMMENDED_: "TRUE"
_R_CHECK_EXECUTABLES_EXCLUSIONS_: "FALSE"
_R_CHECK_DOC_SIZES2_: "TRUE"
_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_: "TRUE"
_R_CHECK_CODE_ATTACH_: "TRUE"
_R_CHECK_CODE_DATA_INTO_GLOBALENV_: "TRUE"
_R_CHECK_CODE_USAGE_VIA_NAMESPACES_: "TRUE"
_R_CHECK_DOT_FIRSTLIB_: "TRUE"
_R_CHECK_DEPRECATED_DEFUNCT_: "TRUE"
_R_CHECK_REPLACING_IMPORTS_: "TRUE"
_R_CHECK_SCREEN_DEVICE_: "stop"
_R_CHECK_TOPLEVEL_FILES_: "TRUE"
_R_CHECK_S3_METHODS_NOT_REGISTERED_: "TRUE"
_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_: "TRUE"
_R_CHECK_FORCE_SUGGESTS_: "FALSE"
stages:
- dependencies
- build
- test
mirror-packages:
stage: dependencies
tags:
- linux
- medium
image: docker.io/jangorecki/r-base-dev
script:
- mkdir -p bus/$CI_BUILD_NAME/cran/src/contrib
# mirror R dependencies
- wget -q -O ci.R http://gitlab.0xdata.loc/jangorecki/cran/raw/master/ci.R
- Rscript -e 'source("ci.R"); mirror.packages(packages.dcf("DESCRIPTION", "all"), repos=Sys.getenv("CRAN_MIRROR"), repodir="bus/mirror-packages/cran")'
#- Rscript -e 'source("ci.R"); mirror.packages(type="win.binary", packages.dcf(c("h2o-DESCRIPTION.template","h2oEnsemble-DESCRIPTION","rsparkling-DESCRIPTION"), "all"), repos=Sys.getenv("CRAN_MIRROR"), repodir="bus/mirror-packages/cran")'
# devel h2o
- Rscript -e 'source("ci.R"); mirror.packages("h2o", repos="http://cran.0xdata.loc", repodir="bus/build-h2o/cran")'
- mv ci.R bus/.
artifacts:
expire_in: 2 weeks
paths:
- bus
build-rsparkling:
stage: build
tags:
- linux
- medium
image: docker.io/jangorecki/r-builder-openjdk8
dependencies: []
#- mirror-packages # when dependencies required (also on vignettes) # when uncomment also handle no "bus" dir in build
script:
- R CMD build .
- mkdir -p bus/$CI_BUILD_NAME/cran/src/contrib
- mv $(ls -1t rsparkling_*.tar.gz | head -n 1) bus/$CI_BUILD_NAME/cran/src/contrib/.
- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/build-rsparkling/cran"), addFiles=TRUE)'
artifacts:
expire_in: 2 weeks
paths:
- bus
test-rsparkling-r-release:
stage: test
tags:
- linux
- medium
image: docker.io/jangorecki/r-builder-openjdk8
variables:
NOT_CRAN: "true"
#H2O_JAR_PATH: "$CI_PROJECT_DIR/bus/h2o-release/java/h2o.jar" # TODO: re-use jar
dependencies:
- mirror-packages
- build-rsparkling
script:
- mkdir -p bus/$CI_BUILD_NAME
- Rscript -e 'source("bus/ci.R"); if (length(pkgs<-packages.dcf("DESCRIPTION", "all"))) install.packages(pkgs, repos=file.path("file:",normalizePath("bus/mirror-packages/cran")))'
- cd bus/$CI_BUILD_NAME
- Rscript -e 'file.copy(download.packages("rsparkling", repos=file.path("file:",normalizePath("../build-rsparkling/cran")))[,2], ".")'
- R CMD check --run-dontrun --run-donttest $(ls -1t rsparkling_*.tar.gz | head -n 1)
artifacts:
expire_in: 2 weeks
when: always
paths:
- bus
test-rsparkling-r-release-cran:
stage: test
tags:
- linux
- medium
image: docker.io/jangorecki/r-builder-openjdk8
variables:
_R_CHECK_CRAN_INCOMING_: "TRUE"
_R_CHECK_CRAN_INCOMING_REMOTE_: "TRUE"
#H2O_JAR_PATH: "$CI_PROJECT_DIR/bus/h2o-release/java/h2o.jar"
dependencies:
- mirror-packages
- build-rsparkling
script:
- mkdir -p bus/$CI_BUILD_NAME
- Rscript -e 'source("bus/ci.R"); if (length(pkgs<-packages.dcf("DESCRIPTION", "all"))) install.packages(pkgs, repos=file.path("file:",normalizePath("bus/mirror-packages/cran")))'
- cd bus/$CI_BUILD_NAME
- Rscript -e 'file.copy(download.packages("rsparkling", repos=file.path("file:",normalizePath("../build-rsparkling/cran")))[,2], ".")'
- R CMD check --as-cran $(ls -1t rsparkling_*.tar.gz | head -n 1)
artifacts:
expire_in: 2 weeks
when: always
paths:
- bus
test-rsparkling-r-release-h2o-devel:
stage: test
tags:
- linux
- medium
image: docker.io/jangorecki/r-builder-openjdk8
variables:
NOT_CRAN: "true"
#H2O_JAR_PATH: "$CI_PROJECT_DIR/bus/build-h2o/java/h2o.jar"
dependencies:
- mirror-packages
- build-rsparkling
script:
- mkdir -p bus/$CI_BUILD_NAME
- Rscript -e 'source("bus/ci.R"); if (length(pkgs<-packages.dcf("DESCRIPTION", "all"))) install.packages(pkgs, repos=file.path("file:",normalizePath(c("bus/mirror-packages/cran","bus/build-h2o/cran")))); packageVersion("h2o")'
- cd bus/$CI_BUILD_NAME
- Rscript -e 'file.copy(download.packages("rsparkling", repos=file.path("file:",normalizePath("../build-rsparkling/cran")))[,2], ".")'
- R CMD check --run-dontrun --run-donttest $(ls -1t rsparkling_*.tar.gz | head -n 1)
artifacts:
expire_in: 2 weeks
when: always
paths:
- bus
test-rsparkling-r-release-h2o-oldrel:
stage: test
tags:
- linux
- medium
image: docker.io/jangorecki/r-builder-openjdk8
variables:
NOT_CRAN: "true"
#H2O_JAR_PATH: "$CI_PROJECT_DIR/bus/h2o-3.8.3.3/java/h2o.jar" # this requires even older one, and can be resolved directly from s3 because it is not going to be reused anywhere
dependencies:
- mirror-packages
- build-rsparkling
script:
- mkdir -p bus/$CI_BUILD_NAME
# h2o-oldrel
- wget -q https://cran.r-project.org/src/contrib/Archive/h2o/h2o_3.8.3.3.tar.gz
- tar -zxf h2o_3.8.3.3.tar.gz # this requires cran-dev repo to reach deps
- Rscript -e 'source("bus/ci.R"); if (length(pkgs<-packages.dcf("h2o/DESCRIPTION"))) install.packages(pkgs, repos=c(file.path("file:",normalizePath("bus/mirror-packages/cran")), sprintf("http://%s.0xdata.loc", c("cran","cran-dev"))))'
- R CMD INSTALL h2o_3.8.3.3.tar.gz
# rsparkling
- Rscript -e 'source("bus/ci.R"); if (length(pkgs<-setdiff(packages.dcf("DESCRIPTION", "all"), "h2o"))) install.packages(pkgs, repos=file.path("file:",normalizePath(c("bus/mirror-packages/cran")))); packageVersion("h2o")'
- cd bus/$CI_BUILD_NAME
- Rscript -e 'file.copy(download.packages("rsparkling", repos=file.path("file:",normalizePath("../build-rsparkling/cran")))[,2], ".")'
- R CMD check --run-dontrun --run-donttest $(ls -1t rsparkling_*.tar.gz | head -n 1)
artifacts:
expire_in: 2 weeks
when: always
paths:
- bus
test-rsparkling-spark2-r-release:
stage: test
tags:
- linux
- medium
image: docker.io/jangorecki/r-builder-openjdk8
variables:
NOT_CRAN: "true"
SPARK_VERSION: "2.0.1"
SPARKLINGWATER_VERSION: "2.0.0"
#H2O_JAR_PATH: "$CI_PROJECT_DIR/bus/h2o-release/java/h2o.jar" # read in test-h2oEnsemble-r-release
dependencies:
- mirror-packages
- build-rsparkling
script:
- mkdir -p bus/$CI_BUILD_NAME
- Rscript -e 'source("bus/ci.R"); if (length(pkgs<-packages.dcf("DESCRIPTION", "all"))) install.packages(pkgs, repos=file.path("file:",normalizePath("bus/mirror-packages/cran")))'
- cd bus/$CI_BUILD_NAME
- Rscript -e 'file.copy(download.packages("rsparkling", repos=file.path("file:",normalizePath("../build-rsparkling/cran")))[,2], ".")'
- R CMD check --run-dontrun --run-donttest $(ls -1t rsparkling_*.tar.gz | head -n 1)
artifacts:
expire_in: 2 weeks
when: always
paths:
- bus