@@ -43,17 +43,6 @@ commands:
4343 circleci step halt
4444 fi
4545
46- setup-executor :
47- steps :
48- - run :
49- name : Setup executor
50- command : |
51- sudo apt-get -qq update
52- sudo apt-get -q install -y git openssh-client curl ca-certificates make tar gzip
53- bash <(curl -fsSL https://get.docker.com)
54- # - setup_remote_docker:
55- # docker_layer_caching: true
56-
5746 relocate-docker-storage :
5847 steps :
5948 - run :
@@ -138,54 +127,6 @@ commands:
138127 - store_artifacts :
139128 path : tests/logs
140129
141- platforms-build-steps :
142- steps :
143- - abort_for_docs
144- - abort_for_noci
145- - early_return_for_forked_pull_requests
146- - checkout-all
147- - relocate-docker-storage
148- - setup-automation
149- - run :
150- name : Build for platform
151- command : |
152- pushd opt/build/docker
153- docker login -u redisfab -p $DOCKER_REDISFAB_PWD
154- for osnick in bionic xenial; do
155- make CPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
156- make GPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
157- docker image prune -f
158- done
159- popd > /dev/null
160- logstar=bin/artifacts/tests-logs-cpu.tgz
161- logsdir=tests/logs/cpu
162- mkdir -p $logsdir
163- if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
164- (cd bin/artifacts; tar -cf snapshots.tar snapshots/)
165- no_output_timeout : 40m
166- - persist_to_workspace :
167- root : bin/
168- paths :
169- - artifacts/*.zip
170- - artifacts/*.tgz
171- - artifacts/*.tar
172- - store_artifacts :
173- path : test/logs
174-
175- deploy-steps :
176- parameters :
177- from :
178- type : string
179- steps :
180- - abort_for_docs
181- - abort_for_noci
182- - early_return_for_forked_pull_requests
183- - run :
184- name : Deploy to S3
185- command : |
186- du -ah --apparent-size artifacts/*
187- aws s3 cp artifacts/ s3://redismodules/$PACKAGE_NAME/ --acl public-read --recursive --exclude "*" --include "*.zip" --include "*.tgz"
188-
189130jobs :
190131 lint :
191132 docker :
@@ -207,16 +148,43 @@ jobs:
207148 - build-steps :
208149 platform : debian
209150
210- # this build runs on a fixed machine, due to a storage need
211- # nothing about it necessitates the machine itself, other than the need for more disk.
212151 platforms-build :
213- machine :
214- enabled : true
215- docker_layer_caching : true
216- resource_class : medium
217- image : ubuntu-2004:202101-01
152+ parameters :
153+ lite : # LITE value during make
154+ type : string
155+ osnick : # OSNICK value for the base platform of the docker
156+ type : string
157+ target : # CPU|GPU
158+ type : string
159+ docker :
160+ - image : redisfab/rmbuilder:6.2.1-x64-buster
218161 steps :
219- - platforms-build-steps
162+ - abort_for_docs
163+ - abort_for_noci
164+ - early_return_for_forked_pull_requests
165+ - setup_remote_docker
166+ - checkout-all
167+ - setup-automation
168+ - run :
169+ name : Build for platform
170+ command : |
171+ bash <(curl -fsSL https://get.docker.com)
172+ pushd opt/build/docker
173+ docker login -u redisfab -p $DOCKER_REDISFAB_PWD
174+ make build <<parameters.target>> OSNICK=<<parameters.osnick>> ARTIFACTS=1 VERBOSE=1 <<parameters.lite>>
175+ popd > /dev/null
176+ logstar=bin/artifacts/tests-logs-cpu.tgz
177+ logsdir=tests/logs/cpu
178+ mkdir -p $logsdir
179+ if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
180+ # (cd bin/artifacts; tar -cf snapshots.tar snapshots/)
181+ no_output_timeout : 40m
182+ - persist_to_workspace :
183+ root : bin/
184+ paths :
185+ - artifacts/*
186+ - store_artifacts :
187+ path : test/logs
220188
221189 coverage :
222190 docker :
@@ -414,14 +382,7 @@ jobs:
414382 - run :
415383 name : Deploy Snapshots to S3
416384 command : |
417- cd workspace/artifacts
418- for f in snapshots*.tar; do
419- echo "Extracting $f ..."
420- tar xf $f
421- done
422- echo "... done."
423- du -ah --apparent-size *
424- cd snapshots
385+ cd workspace/artifacts/snapshots
425386 for f in `ls *.zip *.tgz`; do
426387 aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/snapshots/ --acl public-read
427388 done
@@ -518,11 +479,12 @@ on-version-tags: &on-version-tags
518479 tags :
519480 only : /^v[0-9].*/
520481
521- on-master-and- version-tags : &on-master-and- version-tags
482+ on-master-version-tags-and-dockertests : &on-master-version-tags-and-dockertests
522483 filters :
523484 branches :
524485 only :
525486 - master
487+ - /.*dockertest$/
526488 tags :
527489 only : /^v[0-9].*/
528490
@@ -544,14 +506,26 @@ workflows:
544506 version : 2
545507 build_and_package :
546508 jobs :
509+
547510 - lint :
548511 << : *on-any-branch
549512 - build-and-test :
550513 << : *on-any-branch-but-tags
551514 << : *after-linter
552515 - platforms-build :
553516 << : *after-build-and-test
554- << : *on-master-and-version-tags
517+ << : *on-master-version-tags-and-dockertests
518+ matrix :
519+ parameters :
520+ osnick :
521+ - xenial
522+ - bionic
523+ lite :
524+ - " REDISAI_LITE=0 publish"
525+ - " REDISAI_LITE=1"
526+ target :
527+ - " CPU=1"
528+ - " GPU=1"
555529 - coverage :
556530 context : common
557531 << : *on-dev-branches
@@ -572,7 +546,7 @@ workflows:
572546 - deploy-snapshot :
573547 context : common
574548 << : *after-platform-builds
575- << : *on-integ-branch
549+ << : *on-master-version-tags-and-dockertests
576550 - deploy-release :
577551 context : common
578552 << : *after-platform-builds
0 commit comments