Skip to content

Commit 48fd833

Browse files
author
DvirDukhan
committed
Merge branch 'master' into v1.2.5
2 parents 53efa26 + 0f99f12 commit 48fd833

File tree

138 files changed

+3934
-6463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+3934
-6463
lines changed

.circleci/config.yml

Lines changed: 117 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ commands:
5757
fi
5858
5959
relocate-docker-storage:
60+
description: >-
61+
If this runs in parallel it can slaughter docker builds due to behaviour in the overlay2
62+
tree having missing bits. This mitigates that by ensuring we run it only once. This could
63+
have parallelization consequences if everything lines up.
6064
steps:
6165
- run:
6266
name: Relocate docker overlay2 dir
@@ -91,6 +95,25 @@ commands:
9195
name: Checkout submodules
9296
command: git submodule update --init --recursive
9397

98+
docker-build-steps:
99+
parameters:
100+
lite: # LITE value during make
101+
type: string
102+
osnick: # OSNICK value for the base platform of the docker
103+
type: string
104+
target: # CPU|GPU
105+
type: string
106+
steps:
107+
# since we run in parallel, we need to generate docker files with different suffixes hence the DOCKER_SUFFIX
108+
- run:
109+
name: Build for platform
110+
command: |
111+
bash <(curl -fsSL https://raw.githubusercontent.com/docker/docker-install/master/install.sh)
112+
pushd opt/build/docker
113+
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
114+
make build DOCKER_SUFFIX="$$" <<parameters.target>> OSNICK=<<parameters.osnick>> PACK=1 VERBOSE=1 <<parameters.lite>>
115+
no_output_timeout: 40m
116+
94117
build-steps:
95118
parameters:
96119
platform:
@@ -101,7 +124,7 @@ commands:
101124
- checkout-all
102125
- restore_cache:
103126
keys:
104-
- v1-dependencies-{{ checksum "get_deps.sh" }}
127+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu
105128
# If no exact match is found will get dependencies from source
106129
- setup-build-system
107130
- run:
@@ -112,15 +135,10 @@ commands:
112135
- save_cache:
113136
paths:
114137
- deps
115-
key: build-dependencies-{{ checksum "get_deps.sh" }}
138+
key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu
116139
- run:
117140
name: Build
118141
command: make -C opt all SHOW=1
119-
- run:
120-
name: Unit Tests
121-
command: |
122-
make -C opt unit_tests SHOW=1
123-
no_output_timeout: 5m
124142
- run:
125143
name: Test
126144
command: |
@@ -151,7 +169,7 @@ commands:
151169
- checkout-all
152170
- restore_cache:
153171
keys:
154-
- build-dependencies-{{ checksum "get_deps.sh" }}
172+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu
155173
# If no exact match is found will get dependencies from source
156174
- setup-build-system
157175
- run:
@@ -176,13 +194,20 @@ commands:
176194
- abort_for_docs
177195
- abort_for_noci
178196
- checkout-all
197+
- restore_cache:
198+
keys:
199+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-gpu
179200
- relocate-docker-storage
180201
- run:
181202
name: Build
182203
command: |
183204
pip3 install --user jinja2
184205
pushd opt/build/docker
185206
make DOCKER_SUFFIX=".gpu-test" DOCKER_ARGS="-s dockerfile-gpu-test.tmpl" DOCKER_OPTS=--no-cache DEFAULT_TAG="redisai-gpu:latest-test"
207+
- save_cache:
208+
paths:
209+
- deps
210+
key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-gpu
186211
- run:
187212
name: Test
188213
command: |
@@ -208,59 +233,92 @@ jobs:
208233
209234
build-and-test:
210235
docker:
211-
- image: redisfab/rmbuilder:6.2.1-x64-buster
236+
- image: redisfab/rmbuilder:6.2.5-x64-buster
212237
steps:
213238
- build-steps:
214239
platform: debian
215240

216-
platforms-build:
241+
platforms-build-cpu:
242+
docker:
243+
- image: redisfab/rmbuilder:6.2.5-x64-buster
217244
parameters:
218245
lite: # LITE value during make
219246
type: string
220247
osnick: # OSNICK value for the base platform of the docker
221248
type: string
222-
target: # CPU|GPU
249+
target: # OSNICK value for the base platform of the docker
223250
type: string
224-
docker:
225-
- image: redisfab/rmbuilder:6.2.1-x64-buster
251+
default: "CPU=1"
226252
steps:
227253
- abort_for_docs
228254
- abort_for_noci
229255
- early_return_for_forked_pull_requests
230256
- setup_remote_docker
231257
- checkout-all
258+
- restore_cache:
259+
keys:
260+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-<<parameters.osnick>>-<<parameters.target>>
232261
- setup-automation
262+
- docker-build-steps:
263+
lite: "<<parameters.lite>>"
264+
osnick: "<<parameters.osnick>>"
265+
target: "<<parameters.target>>"
266+
- save_cache:
267+
paths:
268+
- deps
269+
key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-<<parameters.osnick>>-<<parameters.target>>
270+
- persist_to_workspace:
271+
root: bin/
272+
paths:
273+
- artifacts/*
233274

234-
# since we run in parallel, we need to generate docker files with different suffixes hence the DOCKER_SUFFIX
235-
- run:
236-
name: Build for platform
237-
command: |
238-
bash <(curl -fsSL https://raw.githubusercontent.com/docker/docker-install/master/install.sh)
239-
pushd opt/build/docker
240-
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
241-
make build DOCKER_SUFFIX="$$" <<parameters.target>> OSNICK=<<parameters.osnick>> PACK=1 VERBOSE=1 <<parameters.lite>>
242-
popd > /dev/null
243-
logstar=bin/artifacts/tests-logs-cpu.tgz
244-
logsdir=tests/logs/cpu
245-
mkdir -p $logsdir
246-
if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
247-
# (cd bin/artifacts; tar -cf snapshots.tar snapshots/)
248-
no_output_timeout: 40m
275+
276+
platforms-build-gpu:
277+
machine:
278+
enabled: true
279+
resource_class: medium
280+
image: ubuntu-2004:202107-02
281+
parameters:
282+
lite: # LITE value during make
283+
type: string
284+
osnick: # OSNICK value for the base platform of the docker
285+
type: string
286+
target: # OSNICK value for the base platform of the docker
287+
type: string
288+
default: "GPU=1"
289+
steps:
290+
- abort_for_docs
291+
- abort_for_noci
292+
- early_return_for_forked_pull_requests
293+
- checkout-all
294+
- relocate-docker-storage
295+
- restore_cache:
296+
keys:
297+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-<<parameters.osnick>>-<<parameters.target>>
298+
- setup-automation
299+
- docker-build-steps:
300+
lite: "<<parameters.lite>>"
301+
osnick: "<<parameters.osnick>>"
302+
target: "<<parameters.target>>"
303+
- save_cache:
304+
paths:
305+
- deps
306+
key: v1.2.5-deps-{{ checksum "get_deps.sh" }}-<<parameters.osnick>>-<<parameters.target>>
249307
- persist_to_workspace:
250308
root: bin/
251309
paths:
252310
- artifacts/*
253311

254312
coverage:
255313
docker:
256-
- image: redisfab/rmbuilder:6.2.1-x64-buster
314+
- image: redisfab/rmbuilder:6.2.5-x64-buster
257315
steps:
258316
- abort_for_docs
259317
- abort_for_noci
260318
- checkout-all
261319
- restore_cache:
262320
keys:
263-
- build-dependencies-{{ checksum "get_deps.sh" }}
321+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu
264322
# If no exact match is found will get dependencies from source
265323
- setup-build-system
266324
- run:
@@ -287,14 +345,14 @@ jobs:
287345
type: string
288346
default: "CLUSTER=0"
289347
docker:
290-
- image: redisfab/rmbuilder:6.2.1-x64-buster
348+
- image: redisfab/rmbuilder:6.2.5-x64-buster
291349
steps:
292350
- abort_for_docs
293351
- abort_for_noci
294352
- checkout-all
295353
- restore_cache:
296354
keys:
297-
- build-dependencies-{{ checksum "get_deps.sh" }}
355+
- v1.2.5-deps-{{ checksum "get_deps.sh" }}-cpu
298356
# If no exact match is found will get dependencies from source
299357
- setup-build-system
300358
- run:
@@ -316,64 +374,25 @@ jobs:
316374

317375
valgrind-general-for-forked-prs:
318376
docker:
319-
- image: redisfab/rmbuilder:6.2.1-x64-buster
377+
- image: redisfab/rmbuilder:6.2.5-x64-buster
320378
steps:
321379
- only_run_if_forked_pull_request
322380
- valgrind-general-steps
323381

324382
valgrind-general:
325383
docker:
326-
- image: redisfab/rmbuilder:6.2.1-x64-buster
384+
- image: redisfab/rmbuilder:6.2.5-x64-buster
327385
steps:
328386
- valgrind-general-steps
329387

330-
# build-macos:
331-
# macos:
332-
# xcode: 11.3.0
333-
# steps:
334-
# - abort_for_docs
335-
# - run:
336-
# name: Fix macOS Python installation
337-
# command: |
338-
# brew reinstall -f python2
339-
# - build-steps:
340-
# platform: macos
341-
#
342-
# build-multiarch-docker:
343-
# machine:
344-
# enabled: true
345-
# image: cimg/base:2020.01
346-
# steps:
347-
# - abort_for_docs
348-
# - checkout-all
349-
# - run:
350-
# name: Checkout LFS
351-
# command: |
352-
# curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
353-
# sudo apt-get install -y git-lfs
354-
# git lfs install
355-
# git lfs pull
356-
# - run:
357-
# name: Setup Docker client experimental features
358-
# command: |
359-
# sudo ./opt/readies/bin/getdocker --just-enable-exp
360-
# docker version
361-
# - run:
362-
# name: Build
363-
# command: |
364-
# sudo docker login -u redisfab -p $DOCKER_REDISFAB_PWD
365-
# cd opt/build/docker
366-
# make build
367-
# sudo make publish
368-
369388
# internal PRs execute build-and-test either in a workflow or
370389
# via a github action trigger
371390
build-and-test-gpu:
372391
machine:
373392
enabled: true
374393
docker_layer_caching: true
375394
resource_class: gpu.nvidia.small
376-
image: ubuntu-1604-cuda-11.1:202012-01
395+
image: ubuntu-2004-cuda-11.2:202103-01
377396

378397
steps:
379398
- build-and-test-gpu-steps
@@ -385,7 +404,7 @@ jobs:
385404
enabled: true
386405
docker_layer_caching: true
387406
resource_class: gpu.nvidia.small
388-
image: ubuntu-1604-cuda-11.1:202012-01
407+
image: ubuntu-2004-cuda-11.2:202103-01
389408

390409
steps:
391410
- only_run_if_forked_pull_request
@@ -396,7 +415,7 @@ jobs:
396415
location:
397416
type: string
398417
docker:
399-
- image: redisfab/rmbuilder:6.2.1-x64-buster
418+
- image: redisfab/rmbuilder:6.2.5-x64-buster
400419
steps:
401420
- abort_for_docs
402421
- abort_for_noci
@@ -414,7 +433,7 @@ jobs:
414433
415434
deploy-snapshot:
416435
docker:
417-
- image: redisfab/rmbuilder:6.2.1-x64-buster
436+
- image: redisfab/rmbuilder:6.2.5-x64-buster
418437
steps:
419438
- abort_for_docs
420439
- abort_for_noci
@@ -431,7 +450,7 @@ jobs:
431450
432451
deploy-release:
433452
docker:
434-
- image: redisfab/rmbuilder:6.2.1-x64-buster
453+
- image: redisfab/rmbuilder:6.2.5-x64-buster
435454
steps:
436455
- abort_for_docs
437456
- abort_for_noci
@@ -449,7 +468,7 @@ jobs:
449468
450469
release-automation:
451470
docker:
452-
- image: redisfab/rmbuilder:6.2.1-x64-buster
471+
- image: redisfab/rmbuilder:6.2.5-x64-buster
453472
steps:
454473
- checkout
455474
- setup-automation
@@ -463,7 +482,7 @@ jobs:
463482

464483
#nightly-automation:
465484
# docker:
466-
# - image: redisfab/rmbuilder:6.2.1-x64-buster
485+
# - image: redisfab/rmbuilder:6.2.5-x64-buster
467486
# steps:
468487
# - checkout
469488
# - setup-automation
@@ -544,7 +563,8 @@ after-build-and-test: &after-build-and-test
544563

545564
after-platform-builds: &after-platform-builds
546565
requires:
547-
- platforms-build
566+
- platforms-build-gpu
567+
- platforms-build-cpu
548568

549569
#### define workflows
550570
workflows:
@@ -563,7 +583,21 @@ workflows:
563583
- build-and-test-gpu-for-forked-prs:
564584
<<: *on-any-branch
565585
<<: *after-linter
566-
- platforms-build:
586+
- platforms-build-cpu:
587+
context: common
588+
<<: *after-build-and-test
589+
<<: *on-master-version-tags-and-dockertests
590+
matrix:
591+
parameters:
592+
osnick:
593+
- xenial
594+
- bionic
595+
- centos8
596+
lite:
597+
- "REDISAI_LITE=0 PUBLISH=1"
598+
- "REDISAI_LITE=1"
599+
600+
- platforms-build-gpu:
567601
context: common
568602
<<: *after-build-and-test
569603
<<: *on-master-version-tags-and-dockertests
@@ -572,12 +606,10 @@ workflows:
572606
osnick:
573607
- xenial
574608
- bionic
609+
- centos8
575610
lite:
576611
- "REDISAI_LITE=0 PUBLISH=1"
577612
- "REDISAI_LITE=1"
578-
target:
579-
- "CPU=1"
580-
- "GPU=1"
581613
- coverage:
582614
context: common
583615
<<: *on-dev-branches

0 commit comments

Comments
 (0)