Skip to content

Commit 34c68bd

Browse files
authored
Merge branch 'master' into disable-nightly-automation
2 parents d7daaee + ec96a29 commit 34c68bd

File tree

7 files changed

+114
-60
lines changed

7 files changed

+114
-60
lines changed

.circleci/config.yml

Lines changed: 104 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ commands:
4343
circleci step halt
4444
fi
4545
46+
only_run_if_forked_pull_request:
47+
description: >-
48+
If this build is from an internal (i.e not a forked) pull request, then end early.
49+
This is required when we want different behaviours for external, versus internal PRs.
50+
steps:
51+
- run:
52+
name: Return early if not a forked pull request
53+
command: |
54+
if [[ ! -n "$CIRCLE_PR_NUMBER" ]]; then
55+
echo "Not a forked PR so marking as successfull and exiting"
56+
circleci step halt
57+
fi
58+
4659
relocate-docker-storage:
4760
steps:
4861
- run:
@@ -127,6 +140,64 @@ commands:
127140
- store_artifacts:
128141
path: tests/logs
129142

143+
valgrind-general-steps:
144+
parameters:
145+
test_args:
146+
type: string
147+
default: "CLUSTER=0 AOF=0"
148+
steps:
149+
- abort_for_docs
150+
- abort_for_noci
151+
- checkout-all
152+
- restore_cache:
153+
keys:
154+
- build-dependencies-{{ checksum "get_deps.sh" }}
155+
# If no exact match is found will get dependencies from source
156+
- setup-build-system
157+
- run:
158+
name: Install dependencies
159+
command: |
160+
./opt/readies/bin/getredis -v 6.0 --valgrind --force
161+
./get_deps.sh cpu
162+
- run:
163+
name: Build for valgrind
164+
command: |
165+
make -C opt all VALGRIND=1 SHOW=1
166+
- run:
167+
name: Test with valgrind
168+
command: |
169+
make -C opt test VALGRIND=1 <<parameters.test_args>>
170+
no_output_timeout: 120m
171+
172+
build-and-test-gpu-steps:
173+
steps:
174+
- abort_for_docs
175+
- abort_for_noci
176+
- checkout-all
177+
- run:
178+
name: Relocate docker overlay2 dir
179+
command: |
180+
sudo systemctl stop docker
181+
sudo mkdir -p /var2/lib/docker
182+
sudo mv /var/lib/docker/overlay2 /var2/lib/docker
183+
sudo mkdir /var/lib/docker/overlay2
184+
sudo mount --bind /var2/lib/docker/overlay2 /var/lib/docker/overlay2
185+
sudo systemctl start docker
186+
- run:
187+
name: Build
188+
command: |
189+
docker build -f Dockerfile.gpu-test --no-cache -t redisai-gpu:latest-x64-bionic-test .
190+
- run:
191+
name: Test
192+
command: |
193+
mkdir -p $HOME/tests
194+
docker run --gpus all -v $HOME/tests:/build/tests/logs -it --rm redisai-gpu:latest-x64-bionic-test
195+
no_output_timeout: 40m
196+
- store_artifacts:
197+
path: tests/logs
198+
199+
200+
130201
jobs:
131202
lint:
132203
docker:
@@ -245,37 +316,18 @@ jobs:
245316
make -C opt test VALGRIND=1 <<parameters.test_args>>
246317
no_output_timeout: 120m
247318

319+
valgrind-general-for-forked-prs:
320+
docker:
321+
- image: redisfab/rmbuilder:6.2.1-x64-buster
322+
steps:
323+
- only_run_if_forked_pull_request
324+
- valgrind-general-steps
325+
248326
valgrind-general:
249-
parameters:
250-
test_args:
251-
type: string
252-
default: "CLUSTER=0 AOF=0"
253327
docker:
254328
- image: redisfab/rmbuilder:6.2.1-x64-buster
255329
steps:
256-
- abort_for_docs
257-
- abort_for_noci
258-
- early_return_for_forked_pull_requests
259-
- checkout-all
260-
- restore_cache:
261-
keys:
262-
- build-dependencies-{{ checksum "get_deps.sh" }}
263-
# If no exact match is found will get dependencies from source
264-
- setup-build-system
265-
- run:
266-
name: Install dependencies
267-
command: |
268-
./opt/readies/bin/getredis -v 6.0 --valgrind --force
269-
./get_deps.sh cpu
270-
- run:
271-
name: Build for valgrind
272-
command: |
273-
make -C opt all VALGRIND=1 SHOW=1
274-
- run:
275-
name: Test with valgrind
276-
command: |
277-
make -C opt test VALGRIND=1 <<parameters.test_args>>
278-
no_output_timeout: 120m
330+
- valgrind-general-steps
279331

280332
# build-macos:
281333
# macos:
@@ -316,6 +368,8 @@ jobs:
316368
# make build
317369
# sudo make publish
318370

371+
# internal PRs execute build-and-test either in a workflow or
372+
# via a github action trigger
319373
build-and-test-gpu:
320374
machine:
321375
enabled: true
@@ -324,30 +378,20 @@ jobs:
324378
image: ubuntu-1604-cuda-11.1:202012-01
325379

326380
steps:
327-
- abort_for_docs
328-
- abort_for_noci
329-
- checkout-all
330-
- run:
331-
name: Relocate docker overlay2 dir
332-
command: |
333-
sudo systemctl stop docker
334-
sudo mkdir -p /var2/lib/docker
335-
sudo mv /var/lib/docker/overlay2 /var2/lib/docker
336-
sudo mkdir /var/lib/docker/overlay2
337-
sudo mount --bind /var2/lib/docker/overlay2 /var/lib/docker/overlay2
338-
sudo systemctl start docker
339-
- run:
340-
name: Build
341-
command: |
342-
docker build -f Dockerfile.gpu-test --no-cache -t redisai-gpu:latest-x64-bionic-test .
343-
- run:
344-
name: Test
345-
command: |
346-
mkdir -p $HOME/tests
347-
docker run --gpus all -v $HOME/tests:/build/tests/logs -it --rm redisai-gpu:latest-x64-bionic-test
348-
no_output_timeout: 40m
349-
- store_artifacts:
350-
path: tests/logs
381+
- build-and-test-gpu-steps
382+
383+
# in the case of a forked PR, we want to run the GPU steps
384+
# hence we check if we're forked, explicitly
385+
build-and-test-gpu-for-forked-prs:
386+
machine:
387+
enabled: true
388+
docker_layer_caching: true
389+
resource_class: gpu.nvidia.small
390+
image: ubuntu-1604-cuda-11.1:202012-01
391+
392+
steps:
393+
- only_run_if_forked_pull_request
394+
- build-and-test-gpu-steps
351395

352396
deploy-artifacts:
353397
parameters:
@@ -512,6 +556,12 @@ workflows:
512556
- build-and-test:
513557
<<: *on-any-branch
514558
<<: *after-linter
559+
- build-and-test-gpu:
560+
<<: *on-integ-branch
561+
<<: *after-linter
562+
- build-and-test-gpu-for-forked-prs:
563+
<<: *on-any-branch
564+
<<: *after-linter
515565
- platforms-build:
516566
<<: *after-build-and-test
517567
<<: *on-master-version-tags-and-dockertests
@@ -530,6 +580,9 @@ workflows:
530580
context: common
531581
<<: *on-dev-branches
532582
<<: *after-linter
583+
- valgrind-general-for-forked-prs:
584+
<<: *on-any-branch
585+
<<: *after-linter
533586
- valgrind:
534587
name: valgrind-cluster
535588
test_args: GEN=0 AOF=0
@@ -540,9 +593,6 @@ workflows:
540593
test_args: GEN=0 CLUSTER=0
541594
<<: *on-integ-branch
542595
<<: *after-linter
543-
- build-and-test-gpu:
544-
<<: *on-integ-branch
545-
<<: *after-linter
546596
- deploy-snapshot:
547597
context: common
548598
<<: *after-platform-builds

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ ADD ./tests/flow/ tests/flow/
3737

3838
RUN FORCE=1 ./opt/readies/bin/getpy3
3939
RUN ./opt/system-setup.py
40+
RUN apt-get update -qq
41+
RUN apt-get upgrade -yqq
42+
RUN rm -rf /var/cache/apt
4043

4144
ARG DEPS_ARGS=""
4245
COPY ./get_deps.sh .

Dockerfile.gpu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ ADD ./tests/flow/ tests/flow/
4242

4343
RUN FORCE=1 ./opt/readies/bin/getpy3
4444
RUN ./opt/system-setup.py
45+
RUN apt-get update -qq
46+
RUN apt-get upgrade -yqq
47+
RUN rm -rf /var/cache/apt
4548

4649
ARG DEPS_ARGS=""
4750
COPY ./get_deps.sh .

ramp-lite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license: Redis Source Available License v1.0
77
command_line_args: "BACKENDSPATH /var/opt/redislabs/modules/ai-lite/{{NUMVER}}/deps"
88
# command_line_args: "BACKENDSPATH /var/opt/redislabs/modules/ai/{{NUMVER}}/deps/backends"
99
min_redis_version: "5.0.7"
10-
min_redis_pack_version: "5.4.14"
10+
min_redis_pack_version: "6.0.12"
1111
capabilities:
1212
- types
1313
- hash_policy

ramp-rce.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license: Redis Source Available License v1.0
77
command_line_args: "BACKENDSPATH /var/opt/redislabs/modules/ai-lite/{{NUMVER}}/deps"
88
# command_line_args: "BACKENDSPATH /var/opt/redislabs/modules/ai/{{NUMVER}}/deps/backends"
99
min_redis_version: "5.0.7"
10-
min_redis_pack_version: "5.4.14"
10+
min_redis_pack_version: "6.0.12"
1111
capabilities:
1212
- types
1313
- hash_policy

ramp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license: Redis Source Available License v1.0
77
command_line_args: "BACKENDSPATH /var/opt/redislabs/modules/ai/{{NUMVER}}/deps"
88
# command_line_args: "BACKENDSPATH /var/opt/redislabs/modules/ai/{{NUMVER}}/deps/backends"
99
min_redis_version: "5.0.7"
10-
min_redis_pack_version: "5.4.14"
10+
min_redis_pack_version: "6.2.2"
1111
capabilities:
1212
- types
1313
- hash_policy

tests/qa/RS_VERSIONS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
6.0.12-58
2-
5.4.14-37
3-
6.0.8-32
4-
100.0.0-2199
2+
100.0.0-2400

0 commit comments

Comments
 (0)