Skip to content

Commit 13bbba7

Browse files
committed
fixes 4
1 parent 9366044 commit 13bbba7

File tree

5 files changed

+59
-16
lines changed

5 files changed

+59
-16
lines changed

.circleci/config.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ commands:
2424
- save_cache:
2525
paths:
2626
- deps
27-
key: v1-dependencies-{{ checksum "get_deps.sh" }}
27+
key: build-dependencies-{{ checksum "get_deps.sh" }}
2828
- run:
2929
name: Set up workspace
3030
command: |
@@ -68,6 +68,36 @@ jobs:
6868
steps:
6969
- ci_steps:
7070
platform: debian
71+
72+
coverage:
73+
docker:
74+
- image: redislabsmodules/rmbuilder:latest
75+
steps:
76+
- checkout
77+
- run:
78+
name: Install dependencies
79+
command: |
80+
./opt/readies/bin/getpy3
81+
BREW_NO_UPDATE=1 ./opt/system-setup.py
82+
git clone git://github.com/antirez/redis.git --branch 5.0.7
83+
(cd redis && make malloc=libc -j $(nproc) && make install)
84+
redis-server --version
85+
- restore_cache:
86+
keys:
87+
- build-dependencies-{{ checksum "get_deps.sh" }}
88+
# fallback to using the latest cache if no exact match is found
89+
- v1-dependencies-
90+
- run:
91+
name: Build
92+
command: |
93+
# make fetch SHOW=1
94+
make -C opt build COV=1 SHOW=1
95+
- run:
96+
name: Test with coverage
97+
command: |
98+
make -C opt test SHOW=1 COV=1
99+
make cov-upload COV=1
100+
71101
build-macos:
72102
macos:
73103
xcode: 10.2.1
@@ -78,6 +108,7 @@ jobs:
78108
brew reinstall -f python2
79109
- ci_steps:
80110
platform: macosx
111+
81112
build-multiarch-docker:
82113
machine:
83114
enabled: true
@@ -102,6 +133,7 @@ jobs:
102133
sudo docker login -u redisfab -p $DOCKER_REDISFAB_PWD
103134
make -C opt/build/docker build
104135
sudo make -C opt/build/docker publish
136+
105137
build-gpu:
106138
machine:
107139
enabled: true
@@ -129,6 +161,7 @@ jobs:
129161
no_output_timeout: 30m
130162
- store_test_results:
131163
path: ~/workspace/tests
164+
132165
deploy_package:
133166
parameters:
134167
package:
@@ -164,6 +197,14 @@ workflows:
164197
filters:
165198
tags:
166199
only: /.*/
200+
- coverage:
201+
requires:
202+
- build
203+
filters:
204+
branches:
205+
only: /.*/
206+
tags:
207+
only: /.*/
167208
- build-macos:
168209
filters:
169210
branches:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/redisai/redisai.svg)](https://hub.docker.com/r/redisai/redisai/builds/)
44
[![Mailing List](https://img.shields.io/badge/Mailing%20List-RedisAI-blue)](https://groups.google.com/forum/#!forum/redisai)
55
[![Gitter](https://badges.gitter.im/RedisLabs/RedisAI.svg)](https://gitter.im/RedisLabs/RedisAI?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
6+
[![codecov](https://codecov.io/gh/RedisAI/RedisAI/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisAI/RedisAI)
67

78

89
# RedisAI

opt/Makefile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
ROOT:=..
33
include readies/mk/main
44

5-
MK_CMAKE:=1
65
MK.cmake:=1
7-
MK_CMAKE_INSTALL:=1
86
MK_CUSTOM_CLEAN:=1
97

8+
MK_ALL_TARGETS=bindirs fetch build pack
9+
1010
#----------------------------------------------------------------------------------------------
1111

1212
define HELP
@@ -61,19 +61,20 @@ DEPS_FLAGS=cpu
6161
DEVICE=cpu
6262
endif
6363

64+
#----------------------------------------------------------------------------------------------
65+
6466
SRCDIR=..
6567
BINDIR=$(BINROOT)/src
6668
DEPS_DIR=$(ROOT)/deps/$(OS)-$(ARCH)-$(DEVICE)
67-
# INSTALL_DIR=$(ROOT)/bin/$(OS)-$(ARCH)-$(DEVICE)/install
6869
INSTALL_DIR=$(BINROOT)/install-$(DEVICE)
6970

70-
REDIS_VALGRIND_SUPRESS=$(ROOT)/opt/redis_valgrind.sup
71-
7271
TARGET=$(BINDIR)/redisai.so
7372
INSTALLED_TARGET=$(INSTALL_DIR)/redisai.so
7473

7574
BACKENDS_PATH ?= $(INSTALL_DIR)/backends
7675

76+
REDIS_VALGRIND_SUPRESS=$(ROOT)/opt/redis_valgrind.sup
77+
7778
#----------------------------------------------------------------------------------------------
7879

7980
CMAKE_FILES += \
@@ -113,7 +114,7 @@ include $(MK)/defs
113114

114115
#----------------------------------------------------------------------------------------------
115116

116-
.PHONY: deps fetch pack pack_ramp pack_deps test
117+
.PHONY: deps prebuild fetch pack pack_ramp pack_deps test
117118

118119
include $(MK)/rules
119120

@@ -122,7 +123,8 @@ include $(MK)/rules
122123
prebuild:
123124
$(SHOW)if [ ! -d $(DEPS_DIR) ]; then echo $$'Dependencies are not in place.\nPlease run \'make fetch\'.'; exit 1; fi
124125

125-
$(TARGET): prebuild $(MK_MAKEFILES) $(DEPS)
126+
$(info $(TARGET): $(MK_MAKEFILES) $(DEPS))
127+
$(TARGET): $(DEPS)
126128
$(SHOW)mkdir -p $(INSTALL_DIR)
127129
$(SHOW)$(MAKE) -C $(BINDIR)
128130
$(SHOW)$(MAKE) -C $(BINDIR) install
@@ -178,10 +180,9 @@ ifeq ($(COV),1)
178180
$(COVERAGE_RESET)
179181
endif
180182
$(SHOW)\
183+
DEVICE=$(DEVICE) \
181184
MODULE=$(INSTALLED_TARGET) \
182-
GEN=$(GEN) \
183-
AOF=$(AOF) \
184-
SLAVES=$(SLAVES) \
185+
GEN=$(GEN) AOF=$(AOF) SLAVES=$(SLAVES) \
185186
$(ROOT)/test/tests.sh
186187
ifeq ($(COV),1)
187188
$(COVERAGE_COLLECT_REPORT)

opt/readies/mk/cmake.rules

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ ifneq ($(MK.cmake),)
33

44
MK_CMAKE_FILES ?= $(SRCDIR)/CMakeLists.txt
55

6-
$(BINDIR)/Makefile : bindirs $(MK_CMAKE_FILES)
6+
# bindirs
7+
$(BINDIR)/Makefile : $(MK_CMAKE_FILES)
78
$(SHOW)if [ ! -d $(BINDIR) ]; then echo "CMake: $(BINDIR) does not exist."; exit 1; fi
89
$(SHOW)cd $(BINDIR); cmake $(CMAKE_WHY) $(CMAKE_FLAGS) $(abspath $(SRCDIR)) $(CMAKE_SINK)
910

test/tests.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ help() {
3030
AOF=0|1 Tests with --test-aof
3131
SLAVES=0|1 Tests with --test-slaves
3232
33-
TEST=test Run specific test (e.g. test.py:test_name)
34-
VALGRIND=1 Run with Valgrind
35-
VGD=1 Same as VALGRIND=1
36-
CALLGRIND=1 Run with Callgrind
33+
TEST=test Run specific test (e.g. test.py:test_name)
34+
VALGRIND|VGD=1 Run with Valgrind
35+
CALLGRIND|CGD=1 Run with Callgrind
3736
3837
END
3938
}

0 commit comments

Comments
 (0)