Skip to content

Commit 88a59fa

Browse files
committed
merging parallel dockers cpu/gpu
1 parent 310f7d7 commit 88a59fa

File tree

1 file changed

+52
-18
lines changed

1 file changed

+52
-18
lines changed

.circleci/config.yml

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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,23 +127,55 @@ commands:
138127
- store_artifacts:
139128
path: tests/logs
140129

141-
platforms-build-steps:
130+
platforms-build-steps-cpu:
142131
steps:
143132
- abort_for_docs
144133
- abort_for_noci
145134
- early_return_for_forked_pull_requests
135+
- setup_remote_docker
146136
- checkout-all
147-
- relocate-docker-storage
148137
- setup-automation
149138
- run:
150139
name: Build for platform
151140
command: |
141+
bash <(curl -fsSL https://get.docker.com)
152142
pushd opt/build/docker
153143
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
154144
for osnick in bionic xenial; do
155145
make CPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
156-
make GPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
157146
make CPU=1 LITE=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
147+
docker image prune -f
148+
done
149+
popd > /dev/null
150+
logstar=bin/artifacts/tests-logs-cpu.tgz
151+
logsdir=tests/logs/cpu
152+
mkdir -p $logsdir
153+
if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
154+
(cd bin/artifacts; tar -cf snapshots.tar snapshots/)
155+
no_output_timeout: 40m
156+
- persist_to_workspace:
157+
root: bin/
158+
paths:
159+
- artifacts/*.zip
160+
- artifacts/*.tgz
161+
- artifacts/*.tar
162+
- store_artifacts:
163+
path: test/logs
164+
165+
platforms-build-steps-gpu:
166+
steps:
167+
- abort_for_docs
168+
- abort_for_noci
169+
- early_return_for_forked_pull_requests
170+
- checkout-all
171+
- setup-automation
172+
- run:
173+
name: Build for platform
174+
command: |
175+
pushd opt/build/docker
176+
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
177+
for osnick in bionic xenial; do
178+
make GPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
158179
make GPU=1 LITE=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
159180
docker image prune -f
160181
done
@@ -174,6 +195,7 @@ commands:
174195
- store_artifacts:
175196
path: test/logs
176197

198+
177199
deploy-steps:
178200
parameters:
179201
from:
@@ -211,14 +233,22 @@ jobs:
211233

212234
# this build runs on a fixed machine, due to a storage need
213235
# nothing about it necessitates the machine itself, other than the need for more disk.
214-
platforms-build:
236+
platforms-build-gpu:
215237
machine:
216238
enabled: true
217239
docker_layer_caching: true
218240
resource_class: medium
219241
image: ubuntu-2004:202101-01
220242
steps:
221-
- platforms-build-steps
243+
- platforms-build-steps-gpu
244+
245+
# this build runs on a fixed machine, due to a storage need
246+
# nothing about it necessitates the machine itself, other than the need for more disk.
247+
platforms-build-cpu:
248+
docker:
249+
- image: redisfab/rmbuilder:6.2.1-x64-buster
250+
steps:
251+
- platforms-build-steps-cpu
222252

223253
coverage:
224254
docker:
@@ -539,7 +569,8 @@ after-build-and-test: &after-build-and-test
539569

540570
after-platform-builds: &after-platform-builds
541571
requires:
542-
- platforms-build
572+
- platforms-build-cpu
573+
- platforms-build-gpu
543574

544575
#### define workflows
545576
workflows:
@@ -551,7 +582,10 @@ workflows:
551582
- build-and-test:
552583
<<: *on-any-branch-but-tags
553584
<<: *after-linter
554-
- platforms-build:
585+
- platforms-build-cpu:
586+
<<: *after-build-and-test
587+
<<: *on-master-and-version-tags
588+
- platforms-build-gpu:
555589
<<: *after-build-and-test
556590
<<: *on-master-and-version-tags
557591
- coverage:

0 commit comments

Comments
 (0)