Skip to content

Commit 12945d3

Browse files
committed
Build fixes #6
1 parent 6229369 commit 12945d3

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

.circleci/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ commands:
2424
paths:
2525
- deps
2626
key: v1-dependencies-{{ checksum "get_deps.sh" }}
27-
- run:
28-
name: Pull Submodules
29-
command: make -C automation fetch
3027
- run:
3128
name: Build
3229
command: make -C automation all SHOW=1

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IF (NOT DEPS_PATH)
2727
ENDIF()
2828

2929
IF (NOT INSTALL_PATH)
30-
SET(INSTALL_PATH ../install-${DEVICE})
30+
SET(INSTALL_PATH ${CMAKE_SOURCE_DIR}/install-${DEVICE})
3131
ENDIF()
3232

3333
GET_FILENAME_COMPONENT(depsAbs
@@ -102,6 +102,8 @@ IF (APPLE)
102102
LINK_FLAGS "-undefined dynamic_lookup")
103103
ENDIF()
104104

105+
SET(CMAKE_INSTALL_PREFIX ${installAbs})
106+
105107
INSTALL(TARGETS redisai LIBRARY DESTINATION .)
106108

107109
IF (APPLE)

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ARG OSNICK=buster
55

66
# OS=debian:buster-slim|debian:stretch-slim|ubuntu:bionic
7-
OS=debian:buster-slim
7+
ARG OS=debian:buster-slim
88

99
# ARCH=x64|arm64v8|arm32v7
1010
ARG ARCH=x64
@@ -25,8 +25,8 @@ RUN ./automation/system-setup.py
2525
COPY ./get_deps.sh .
2626
RUN ./get_deps.sh cpu
2727

28-
ADD ./ /redisai
29-
RUN make -C automation all SHOW=1
28+
ADD ./ /build
29+
RUN make -C automation build SHOW=1
3030

3131
ARG PACK=0
3232
ARG TEST=0

automation/Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ include $(MK)/rules
5757
#----------------------------------------------------------------------------------------------
5858

5959
prebuild:
60-
$(SHOW)if [ ! -d $(ROOT)/deps ]; then echo $$'Dependencies are not in place.\nPlease run \'make fetch\'.'; exit 1; fi
60+
$(SHOW)if [ ! -d $(DEPS_DIR) ]; then echo $$'Dependencies are not in place.\nPlease run \'make fetch\'.'; exit 1; fi
6161

6262
$(TARGET): prebuild $(MK_MAKEFILES) $(DEPS)
6363
$(SHOW)mkdir -p $(INSTALL_DIR)
@@ -66,17 +66,22 @@ $(TARGET): prebuild $(MK_MAKEFILES) $(DEPS)
6666
# $(SHOW)cd $(ROOT) ;\
6767
# if [ ! -e install ]; then ln -sf install-$(DEVICE) install; fi
6868

69+
install:
70+
$(SHOW)mkdir -p $(INSTALL_DIR)
71+
$(SHOW)$(MAKE) -C $(BINDIR) install
72+
6973
clean:
7074
ifeq ($(ALL),1)
71-
$(SHOW)cd $(ROOT) ;\
72-
rm -rf build install deps/dlpack deps/install-$(DEVICE) deps/*.tar.gz deps/*.zip deps/*.tgz
75+
$(SHOW)if [ -d "$(BINROOT)" ]; then rm -rf $(BINROOT); fi
76+
$(SHOW)if [ -d "$(INSTALL_DIR)" ]; then rm -rf $(INSTALL_DIR); fi
77+
$(SHOW)rm -f $(ROOT)/install-$(DEVICE)
7378
else
7479
$(SHOW)$(MAKE) -C $(BINDIR) clean
7580
endif
7681

7782
#----------------------------------------------------------------------------------------------
7883

79-
fetch:
84+
fetch deps:
8085
@echo Fetching dependencies...
8186
$(SHOW)VERBOSE=$(_SHOW) $(ROOT)/get_deps.sh $(DEPS_FLAGS)
8287

@@ -103,5 +108,6 @@ test:
103108
$(SHOW)set -e ;\
104109
cd $(ROOT)/test ;\
105110
python3 -m RLTest $(TEST_ARGS) --test basic_tests.py \
106-
--junitxml=$(TEST_REPORT_DIR)/tests_report.xml \
107111
--module $(INSTALL_DIR)/redisai.so
112+
113+
# --junitxml=$(TEST_REPORT_DIR)/tests_report.xml

automation/readies/mk/variant.defs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ ARCH=$(shell $(ROOT)/automation/readies/bin/platform --arch)
88

99
#----------------------------------------------------------------------------------------------
1010

11-
GIT_SHA := $(shell git rev-parse HEAD)
12-
GIT_COMMIT := $(shell git describe --always --abbrev=7 --dirty="+")
11+
# GIT_SHA := $(shell git rev-parse HEAD)
12+
# GIT_COMMIT := $(shell git describe --always --abbrev=7 --dirty="+")
1313

1414
#----------------------------------------------------------------------------------------------
1515

automation/system-setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def common_last(self):
5858
self.pip3_install("git+https://github.com/RedisLabsModules/RLTest.git@master")
5959
if not self.has_command("ramp"):
6060
self.pip3_install("git+https://github.com/RedisLabs/RAMP@master")
61-
self.pip3_install("-r ../test/test_requirements.txt")
61+
root = os.path.join(os.path.dirname(__file__), "..")
62+
self.pip3_install("-r {}/test/test_requirements.txt".format(root))
6263

6364
#----------------------------------------------------------------------------------------------
6465

get_deps.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ fi
4242
OS=$(python3 $HERE/automation/readies/bin/platform --os)
4343
ARCH=$(python3 $HERE/automation/readies/bin/platform --arch)
4444

45+
# avoid wget warnings on macOS
46+
[[ $OS == macosx ]] && export LC_ALL=en_US.UTF-8
47+
4548
DEPS_DIR=$HERE/deps/$OS-$ARCH-$DEVICE
4649
mkdir -p ${DEPS_DIR}
4750
cd ${DEPS_DIR}

0 commit comments

Comments
 (0)