forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
426 lines (414 loc) · 14.5 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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: 2.1
workflows:
version: 2
dist-compile:
jobs:
- linux-build
- linux-build-options
- linux-parquet-s3-build
- macos-build
- format-check
- header-check
- linux-benchmarks-basic
# Daily documentation update
nightly:
triggers:
- schedule:
cron: "0 3 * * *"
filters:
branches:
only:
- main
jobs:
- doc-gen-job
# Hourly build on weekdays
weekday:
triggers:
- schedule:
cron: "0 0,4,8,12,16,20 * * 1-5"
filters:
branches:
only:
- main
jobs:
- linux-build
- linux-build-release
- linux-build-options
- linux-parquet-s3-build
- macos-build
executors:
build:
docker:
- image : prestocpp/velox-circleci:kevinwilfong-20220426
resource_class: 2xlarge
environment:
CC: /opt/rh/gcc-toolset-9/root/bin/gcc
CXX: /opt/rh/gcc-toolset-9/root/bin/g++
check:
docker:
- image : prestocpp/velox-check:mikesh-20210609
doc-gen:
docker:
- image : prestocpp/velox-circleci:sagarm-20220131
jobs:
macos-build:
macos:
xcode: "11.7.0"
steps:
- checkout
- run:
name: "Update submodules"
command: |
git submodule sync --recursive
git submodule update --init --recursive
- restore_cache:
name: "Restore Dependency Cache"
key: velox-circleci-macos-deps-{{ checksum ".circleci/config.yml" }}-{{ checksum "scripts/setup-macos.sh" }}
- run:
name: "Install dependencies"
command: |
set -xu
if [[ ! -e ~/deps ]]; then
mkdir ~/deps ~/deps-src
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C ~/deps
PATH=~/deps/bin:${PATH} DEPENDENCY_DIR=~/deps-src INSTALL_PREFIX=~/deps PROMPT_ALWAYS_RESPOND=n ./scripts/setup-macos.sh
rm -rf ~/deps/.git ~/deps/Library/Taps/ # Reduce cache size by 70%.
fi
- save_cache:
name: "Save Dependency Cache"
key: velox-circleci-macos-deps-{{ checksum ".circleci/config.yml" }}-{{ checksum "scripts/setup-macos.sh" }}
paths:
- ~/deps
- run:
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: "Build on MacOS"
command: |
export PATH=~/deps/bin:${PATH}
mkdir -p .ccache
export CCACHE_DIR=$(pwd)/.ccache
ccache -sz -M 5Gi
cmake -B _build/debug -GNinja -DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=~/deps -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
ninja -C _build/debug
ccache -s
no_output_timeout: 1h
- save_cache:
name: "Save CCache cache"
key: velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
linux-build:
executor: build
steps:
- checkout
- run:
name: "Update submodules"
command: |
git submodule sync --recursive
git submodule update --init --recursive
- run:
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: Build
command: |
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make debug NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8
ccache -s
no_output_timeout: 1h
- store_artifacts:
path: '_build/debug/.ninja_log'
- save_cache:
name: "Save CCache cache"
key: velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
- run:
name: "Run Unit Tests"
command: |
cd _build/debug && ctest -j 16 -VV --output-on-failure
no_output_timeout: 1h
- run:
name: "Run Fuzzer Tests"
command: |
_build/debug/velox/expression/tests/velox_expression_fuzzer_test --steps 100000 --logtostderr=1 --minloglevel=0
no_output_timeout: 5m
- run:
name: "Run the velox examples"
command: |
_build/debug/velox/examples/velox_example_expression_eval
_build/debug/velox/examples/velox_example_opaque_type
linux-build-release:
executor: build
steps:
- checkout
- run:
name: "Update submodules"
command: |
git submodule sync --recursive
git submodule update --init --recursive
- run:
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-release-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: Build
command: |
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make release NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8
ccache -s
no_output_timeout: 1h
- store_artifacts:
path: '_build/release/.ninja_log'
- save_cache:
name: "Save CCache cache"
key: velox-ccache-release-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
- run:
name: "Run Unit Tests"
command: |
cd _build/release && ctest -j 16 -VV --output-on-failure
no_output_timeout: 1h
linux-benchmarks-basic:
executor: build
steps:
- checkout
- run:
name: "Update submodules"
command: |
git submodule sync --recursive
git submodule update --init --recursive
- run:
name: "Calculate merge-base date for CCache"
command: |
git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-release-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: "Build Benchmarks - Baseline"
command: |
git checkout $(git merge-base origin/main HEAD)
mkdir -p benchmark-basic-dumps/baseline benchmark-basic-dumps/target
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make benchmarks-basic-build NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8
ccache -s
no_output_timeout: 1h
- run:
name: "Run Benchmarks - Baseline"
command: |
make benchmarks-basic-dump NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8 BENCHMARKS_DUMP_DIR=benchmark-basic-dumps/baseline
- run:
name: "Build Benchmarks - Target"
command: |
git checkout -
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make benchmarks-basic-build NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8
ccache -s
- run:
name: "Run Benchmarks - Target"
command: |
make benchmarks-basic-dump NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8 BENCHMARKS_DUMP_DIR=benchmark-basic-dumps/target
- run:
name: "Benchmarks Summary"
command: |
# We don't want to fail the CI job yet, until we ensure the numbers are stable.
scripts/benchmark-runner.py compare \
--baseline-dump-path benchmark-basic-dumps/baseline \
--target-dump-path benchmark-basic-dumps/target || true
- store_artifacts:
path: '_build/debug/.ninja_log'
- save_cache:
name: "Save CCache cache"
key: velox-ccache-release-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
# Build with different options
linux-build-options:
executor: build
steps:
- checkout
- run:
name: "Update submodules"
command: |
git submodule sync --recursive
git submodule update --init --recursive
- run:
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: Build minimal velox
command: |
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make min_debug NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=16
ccache -s
no_output_timeout: 1h
- run:
name: Build velox without testing
command: |
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make clean
make debug EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_TESTING=OFF" NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=16
ccache -s
no_output_timeout: 1h
- store_artifacts:
path: '_build/debug/.ninja_log'
- save_cache:
name: "Save CCache cache"
key: velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
linux-parquet-s3-build:
executor: build
steps:
- checkout
- run:
name: "Update submodules"
command: |
git submodule sync --recursive
git submodule update --init --recursive
- run:
name: "Calculate merge-base date for CCache"
command: git show -s --format=%cd --date="format:%Y%m%d" $(git merge-base origin/main HEAD) | tee merge-base-date
- restore_cache:
name: "Restore CCache cache"
keys:
- velox-ccache-release-{{ arch }}-{{ checksum "merge-base-date" }}
- run:
name: "Install adapter dependencies"
command: |
mkdir ~/adapter-deps ~/adapter-deps/install
source /opt/rh/gcc-toolset-9/enable
set -xu
DEPENDENCY_DIR=~/adapter-deps PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh
- run:
name: "Install Minio server"
command: |
set -xu
cd ~/adapter-deps/install/bin/
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20220526054841.0.0.x86_64.rpm
rpm -i minio-20220526054841.0.0.x86_64.rpm
- run:
name: Build
command: |
mkdir -p .ccache
export CCACHE_DIR=$(realpath .ccache)
ccache -sz -M 5Gi
source /opt/rh/gcc-toolset-9/enable
make release EXTRA_CMAKE_FLAGS=" -DVELOX_ENABLE_PARQUET=ON -DVELOX_ENABLE_S3=ON " AWSSDK_ROOT_DIR=~/adapter-deps/install NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8
ccache -s
no_output_timeout: 1h
- store_artifacts:
path: '_build/release/.ninja_log'
- save_cache:
name: "Save CCache cache"
key: velox-ccache-release-{{ arch }}-{{ checksum "merge-base-date" }}
paths:
- .ccache/
- run:
name: "Run Unit Tests"
command: |
export PATH=~/adapter-deps/install/bin:${PATH}
cd _build/release && ctest -j 16 -VV --output-on-failure
no_output_timeout: 1h
format-check:
executor: check
steps:
- checkout
- run:
name: Check formatting
command: |
if ! make format-check; then
make format-fix
echo -e "\n==== Apply using:"
echo "patch -p1 \<<EOF"
git --no-pager diff
echo "EOF"
false
fi
header-check:
executor: check
steps:
- checkout
- run:
name: Check license headers
command: |
if ! make header-check; then
make header-fix
echo -e "\n==== Apply using:"
echo "patch -p1 \<<EOF"
git --no-pager diff
echo "EOF"
false
fi
doc-gen-job:
executor: doc-gen
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "ed:40:13:bc:d0:3d:28:26:98:cb:90:31:cc:d3:f1:6b"
- run:
name: "Build docs and update gh-pages"
command: |
git config --global user.email "[email protected]"
git config --global user.name "velox"
git checkout main
make -C velox/docs html
git checkout gh-pages
cp -R velox/docs/_build/html/* docs
git add docs
if [ -n "$(git status --porcelain)" ]
then
git commit -m "Update documentation"
git push
fi