/
config.yml
249 lines (209 loc) · 5.92 KB
/
config.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
version: 2.1
orbs:
sbt:
description: SBT build/test runtime
executors:
default:
docker:
- image: s22s/circleci-openjdk-conda-gdal:b8e30ee
working_directory: ~/repo
environment:
SBT_OPTS: "-Xms32M -Xmx2G -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp"
commands:
setup:
description: Setup for sbt build
steps:
- run:
name: Setup sbt
command: 'true' # NOOP
compile:
description: Do just the compilation stage to minimize sbt memory footprint
steps:
- run:
name: "Compile Scala via sbt"
command: sbt -v -batch compile test:compile it:compile
python:
commands:
setup:
description: Ensure a minimal python environment is avalable and ready
steps:
- run:
name: Install Python and PIP
command: |-
python -m pip install --user 'setuptools>=45.2'
requirements:
description: Install packages identified in requirements file
steps:
- run:
name: Install requirements
command: /opt/conda/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt
rasterframes:
commands:
setup:
steps:
- run:
name: Enable saving core files
command: ulimit -c unlimited -S
save-artifacts:
steps:
- run:
command: |
mkdir -p /tmp/core_dumps
ls -lh /tmp
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
cp core/* /tmp/core_dumps/ 2> /dev/null || true
cp -r /tmp/hsperfdata* /tmp/*.hprof /tmp/core_dumps 2> /dev/null || true
when: on_fail
- store_artifacts:
path: /tmp/core_dumps
- store_test_results:
path: core/target/test-reports
- store_test_results:
path: datasource/target/test-reports
- store_test_results:
path: experimental/target/test-reports
save-doc-artifacts:
steps:
- run:
command: |
mkdir -p /tmp/core_dumps
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
mkdir -p /tmp/markdown
cp /home/circleci/repo/pyrasterframes/target/python/docs/*.md /tmp/markdown 2> /dev/null || true
when: on_fail
- store_artifacts:
path: /tmp/core_dumps
- store_artifacts:
path: /tmp/markdown
- store_artifacts:
path: docs/target/site
destination: rf-site
save-cache:
steps:
- save_cache:
key: v4-dependencies--{{ checksum "build.sbt" }}
paths:
- ~/.ivy2/cache
- ~/.sbt
- ~/.cache/coursier
- ~/.local
restore-cache:
steps:
- restore_cache:
keys:
- v4-dependencies-{{ checksum "build.sbt" }}
jobs:
test:
executor: sbt/default
steps:
- checkout
- sbt/setup
- python/setup
- python/requirements
- rasterframes/setup
- rasterframes/restore-cache
- sbt/compile
- run:
name: "Scala Tests: core"
command: sbt -v -batch core/test
- run:
name: "Scala Tests: datasource"
command: sbt -v -batch datasource/test
- run:
name: "Scala Tests: experimental"
command: sbt -v -batch experimental/test
- run:
name: "Create PyRasterFrames package"
command: sbt -v -batch pyrasterframes/package
- run:
name: "Python Tests"
command: sbt -v -batch pyrasterframes/test
- rasterframes/save-artifacts
- rasterframes/save-cache
docs:
executor: sbt/default
steps:
- checkout
- sbt/setup
- python/setup
- python/requirements
- rasterframes/setup
- rasterframes/restore-cache
- sbt/compile
- run:
name: Build documentation
command: sbt makeSite
no_output_timeout: 30m
- rasterframes/save-doc-artifacts
- rasterframes/save-cache
it:
executor: sbt/default
steps:
- checkout
- sbt/setup
- rasterframes/setup
- rasterframes/restore-cache
- sbt/compile
- run:
name: Integration tests
command: sbt it:test
no_output_timeout: 30m
- rasterframes/save-artifacts
- rasterframes/save-cache
it-no-gdal:
executor: sbt/default
steps:
- checkout
- sbt/setup
- rasterframes/setup
- rasterframes/restore-cache
- run:
name: Uninstall GDAL
command: conda remove gdal -q -y --offline
- sbt/compile
- run:
name: Integration tests
command: sbt it:test
no_output_timeout: 30m
- rasterframes/save-artifacts
- rasterframes/save-cache
workflows:
version: 2
all:
jobs:
- test
- it:
requires:
- test
filters:
branches:
only:
- /feature\/.*-it.*/
- /it\/.*/
- it-no-gdal:
requires:
- test
filters:
branches:
only:
- /feature\/.*-it.*/
- /it\/.*/
- docs:
filters:
branches:
only:
- /feature\/.*docs.*/
- /fix\/.*docs.*/
- /docs\/.*/
weekly:
triggers:
- schedule:
cron: "0 8 4 * *"
filters:
branches:
only:
- develop
jobs:
- test
- it
- it-no-gdal