11version : 2.1
22
33commands :
4+
5+ abort_for_valgrind :
6+ steps :
7+ - run :
8+ name : Avoid running valgrind unless explicitly called
9+ command : |
10+ git log --format=oneline -n 1 $CIRCLE_SHA1|grep 'run valgrind' || circleci step halt
11+
412 abort_for_docs :
513 steps :
614 - run :
715 name : Avoid tests for docs
816 command : |
9- if [[ $CIRCLE_BRANCH == *_docs ]]; then
17+ if [[ $CIRCLE_BRANCH == *docs* ]]; then
1018 echo "Identifies as documents PR, no testing required"
1119 circleci step halt
1220 fi
@@ -29,8 +37,8 @@ commands:
2937 - run :
3038 name : Setup executor
3139 command : |
32- apt-get -qq update
33- apt-get -q install -y git openssh-client curl ca-certificates make tar gzip
40+ sudo apt-get -qq update
41+ sudo apt-get -q install -y git openssh-client curl ca-certificates make tar gzip
3442 bash <(curl -fsSL https://get.docker.com)
3543 - setup_remote_docker :
3644 docker_layer_caching : true
@@ -40,19 +48,19 @@ commands:
4048 - run :
4149 name : Relocate docker overlay2 dir
4250 command : |
43- sudo systemctl stop docker
51+ sudo service docker stop
4452 sudo mkdir -p /var2/lib/docker
4553 sudo mv /var/lib/docker/overlay2 /var2/lib/docker
4654 sudo mkdir /var/lib/docker/overlay2
4755 sudo mount --bind /var2/lib/docker/overlay2 /var/lib/docker/overlay2
48- sudo systemctl start docker
56+ sudo service docker start
4957
5058 setup-automation :
5159 steps :
5260 - run :
5361 name : Setup automation
5462 command : |
55- git submodule update --init opt/readies
63+ git submodule update --init opt/readies
5664 ./opt/readies/bin/getpy3
5765
5866 setup-build-system :
@@ -121,8 +129,8 @@ commands:
121129 platforms-build-steps :
122130 steps :
123131 - abort_for_docs
132+ - setup-executor
124133 - checkout-all
125- - relocate-docker-storage
126134 - setup-automation
127135 - run :
128136 name : Build for platform
@@ -191,12 +199,11 @@ jobs:
191199 platform : debian
192200
193201 platforms-build :
194- machine :
195- enabled : true
196- docker_layer_caching : true
197- resource_class : gpu.nvidia.small
198- image : ubuntu-1604-cuda-11.1:202012-01
202+ docker :
203+ - image : cimg/base:2020.01
199204 steps :
205+ - setup-executor
206+ - relocate-docker-storage
200207 - platforms-build-steps
201208
202209 coverage :
@@ -256,51 +263,84 @@ jobs:
256263 make -C opt test VALGRIND=1 <<parameters.test_args>>
257264 no_output_timeout : 120m
258265
259- build-macos :
260- macos :
261- xcode : 11.3.0
262- steps :
263- - abort_for_docs
264- - run :
265- name : Fix macOS Python installation
266- command : |
267- brew reinstall -f python2
268- - build-steps :
269- platform : macos
270-
271- build-multiarch-docker :
272- machine :
273- enabled : true
274- image : cimg/base:2020.01
266+ valgrind-general :
267+ parameters :
268+ test_args :
269+ type : string
270+ default : " CLUSTER=0 AOF=0"
271+ docker :
272+ - image : redisfab/rmbuilder:6.2.1-x64-buster
275273 steps :
274+ - early_return_for_forked_pull_requests
276275 - abort_for_docs
277276 - checkout-all
277+ - restore_cache :
278+ keys :
279+ - build-dependencies-{{ checksum "get_deps.sh" }}
280+ # If no exact match is found will get dependencies from source
281+ - setup-build-system
278282 - run :
279- name : Checkout LFS
283+ name : Install dependencies
280284 command : |
281- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
282- sudo apt-get install -y git-lfs
283- git lfs install
284- git lfs pull
285+ ./opt/readies/bin/getredis -v 6.0 --valgrind --force
286+ ./get_deps.sh cpu
285287 - run :
286- name : Setup Docker client experimental features
288+ name : Build for valgrind
287289 command : |
288- sudo ./opt/readies/bin/getdocker --just-enable-exp
289- docker version
290+ make -C opt all VALGRIND=1 SHOW=1
290291 - run :
291- name : Build
292+ name : Test with valgrind
292293 command : |
293- sudo docker login -u redisfab -p $DOCKER_REDISFAB_PWD
294- cd opt/build/docker
295- make build
296- sudo make publish
294+ make -C opt test VALGRIND=1 <<parameters.test_args>>
295+ no_output_timeout : 120m
296+
297+
298+ # build-macos:
299+ # macos:
300+ # xcode: 11.3.0
301+ # steps:
302+ # - abort_for_docs
303+ # - run:
304+ # name: Fix macOS Python installation
305+ # command: |
306+ # brew reinstall -f python2
307+ # - build-steps:
308+ # platform: macos
309+ #
310+ # build-multiarch-docker:
311+ # machine:
312+ # enabled: true
313+ # image: cimg/base:2020.01
314+ # steps:
315+ # - abort_for_docs
316+ # - checkout-all
317+ # - run:
318+ # name: Checkout LFS
319+ # command: |
320+ # curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
321+ # sudo apt-get install -y git-lfs
322+ # git lfs install
323+ # git lfs pull
324+ # - run:
325+ # name: Setup Docker client experimental features
326+ # command: |
327+ # sudo ./opt/readies/bin/getdocker --just-enable-exp
328+ # docker version
329+ # - run:
330+ # name: Build
331+ # command: |
332+ # sudo docker login -u redisfab -p $DOCKER_REDISFAB_PWD
333+ # cd opt/build/docker
334+ # make build
335+ # sudo make publish
297336
298337 build-and-test-gpu :
299338 machine :
300339 enabled : true
301340 docker_layer_caching : true
302341 resource_class : gpu.nvidia.small
303342 image : ubuntu-1604-cuda-11.1:202012-01
343+
304344 steps :
305345 - abort_for_docs
306346 - checkout-all
@@ -414,6 +454,13 @@ on-any-branch: &on-any-branch
414454 tags :
415455 only : /.*/
416456
457+ on-any-branch-but-tags : &on-any-branch-but-tags
458+ filters :
459+ branches :
460+ only : /.*/
461+ tags :
462+ ignore : /.*/
463+
417464never : &never
418465 filters :
419466 branches :
@@ -434,17 +481,15 @@ on-integ-branch: &on-integ-branch
434481 only :
435482 - master
436483 - /^\d+\.\d+.*$/
437- - /^feature-.*$/
438484 tags :
439485 ignore : /.*/
440486
441- not- on-integ-branch : ¬- on-integ-branch
487+ on-dev-branches : &on-dev-branches
442488 filters :
443489 branches :
444490 ignore :
445491 - master
446492 - /^\d+\.\d+.*$/
447- - /^feature-.*$/
448493 tags :
449494 ignore : /.*/
450495
@@ -455,13 +500,11 @@ on-version-tags: &on-version-tags
455500 tags :
456501 only : /^v[0-9].*/
457502
458- on-integ -and-version-tags : &on-integ -and-version-tags
503+ on-master -and-version-tags : &on-master -and-version-tags
459504 filters :
460505 branches :
461506 only :
462507 - master
463- - /^\d+\.\d+.*$/
464- - /^feature-.*$/
465508 tags :
466509 only : /^v[0-9].*/
467510
@@ -478,30 +521,22 @@ after-platform-builds: &after-platform-builds
478521 requires :
479522 - platforms-build
480523
481- platform-build-defs : &platform-build-defs
482- << : *after-build-and-test
483- << : *on-integ-and-version-tags
484- # <<: *on-any-branch # debugging
485-
486-
524+ # ### define workflows
487525workflows :
488526 version : 2
489527 build_and_package :
490528 jobs :
491529 - lint :
492530 << : *on-any-branch
493531 - build-and-test :
494- << : *on-any-branch
532+ << : *on-any-branch-but-tags
495533 << : *after-linter
496534 - platforms-build :
497- << : *platform-build-defs
535+ << : *after-build-and-test
536+ << : *on-master-and-version-tags
498537 - coverage :
499538 context : common
500- << : *on-any-branch
501- << : *after-linter
502- - valgrind :
503- test_args : CLUSTER=0 AOF=0
504- << : *on-any-branch
539+ << : *on-dev-branches
505540 << : *after-linter
506541 - valgrind :
507542 name : valgrind-cluster
@@ -514,15 +549,8 @@ workflows:
514549 << : *on-integ-branch
515550 << : *after-linter
516551 - build-and-test-gpu :
517- << : *on-any -branch
552+ << : *on-integ -branch
518553 << : *after-linter
519- - build-macos :
520- << : *never # temporarily disabled
521- # <<: *on-version-tags
522- - build-multiarch-docker :
523- context : common
524- << : *never # temporarily disabled
525- # <<: *on-version-tags
526554 - deploy-snapshot :
527555 context : common
528556 << : *after-platform-builds
@@ -545,7 +573,7 @@ workflows:
545573 branches :
546574 only : master
547575 jobs :
548- - build-macos :
549- << : *never # temporarily disabled
576+ # - build-macos:
577+ # <<: *never # temporarily disabled
550578 - nightly-automation :
551579 context : common
0 commit comments