Add make all command in docker-compose.yml

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
quicksilver 2020-10-31 16:30:20 +08:00 committed by yefu.chen
parent 15b6963be0
commit 5429614462
6 changed files with 17 additions and 18 deletions

View File

@ -43,6 +43,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check # Default is github-pr-check
hadolint_ignore: DL3008
- name: Docker Pull
shell: bash
run: |
@ -61,11 +62,6 @@ jobs:
- name: Docker Run
run: |
docker-compose run ubuntu
- name: Run UnitTest
shell: bash
run: |
cd ${GITHUB_WORKSPACE}/deployments/docker && docker-compose up -d
cd ${GITHUB_WORKSPACE}/scripts/ && ./run_cpp_unittest.sh && ./run_go_unittest.sh
- name: Docker Push
if: success() && github.event_name == 'push' && github.repository == 'zilliztech/milvus-distributed'
continue-on-error: true

11
.gitignore vendored
View File

@ -15,6 +15,9 @@ cmake-build-debug
cmake-build-release
cmake_build
# Docker generated cache file
.docker/
# proxy
proxy/milvus
proxy/cmake_build
@ -36,10 +39,8 @@ sdk/cmake-build-release
sdk/cmake_build_release
# Compiled source
cmd/reader/reader
cmd/master/main
cmd/proxy/proxy
cmd/benchmark/benckmark
bin/
lib/
*.a
*.so
*.so.*
@ -49,3 +50,5 @@ cmd/benchmark/benckmark
*.log
.coverage
*.pyc
.DS_Store

View File

@ -16,7 +16,7 @@ GOPATH := $(shell $(GO) env GOPATH)
INSTALL_PATH := $(PWD)/bin
LIBRARY_PATH := $(PWD)/lib
all: build-go build-cpp
all: build-cpp build-go
#TODO: Use ruleguard to check code specifications
get-check-deps:
@ -38,13 +38,16 @@ lint:
@GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean
# @GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ./.golangci.yml
verifiers: get-check-deps get-build-deps fmt lint
verifiers: get-check-deps fmt lint
# Builds various components locally.
build-go: verifiers
@echo "Building each component's binary to './'"
@echo "Building reader ..."
@mkdir -p $(INSTALL_PATH) && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/reader $(PWD)/cmd/reader/reader.go 1>/dev/null
@echo "Building master ..."
@mkdir -p $(INSTALL_PATH) && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/master $(PWD)/cmd/master/main.go 1>/dev/null
@echo "Building proxy ..."
@mkdir -p $(INSTALL_PATH) && GO111MODULE=on $(GO) build -o $(INSTALL_PATH)/proxy $(PWD)/cmd/proxy/proxy.go 1>/dev/null
build-cpp:
@ -54,7 +57,7 @@ build-cpp-with-unittest:
@(env bash $(PWD)/scripts/core_build.sh -u)
# Runs the tests.
unittest: test-go test-cpp
unittest: test-cpp test-go
#TODO: proxy master reader writer's unittest
test-go: verifiers build-go

View File

@ -17,7 +17,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates gnupg2 && \
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 && \
wget -qO- "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
apt-get update && apt-get install -y --no-install-recommends \
g++ gcc gfortran git make ccache libssl-dev zlib1g-dev libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-serialization-dev python3-dev libboost-python-dev libcurl4-openssl-dev libtbb-dev clang-format-7 clang-tidy-7 lcov && \

View File

@ -24,7 +24,4 @@ services:
working_dir: "/milvus-distributed"
command: &ubuntu-command >
/bin/bash -c "
/milvus-distributed/scripts/core_build.sh -u && \
go build -o /milvus-distributed/cmd/reader/reader /milvus-distributed/cmd/reader/reader.go && \
go build -o /milvus-distributed/cmd/master/master /milvus-distributed/cmd/master/main.go && \
go build -o /milvus-distributed/cmd/proxy/proxy /milvus-distributed/cmd/proxy/proxy.go"
make all"

View File

@ -11,6 +11,6 @@ done
SCRIPTS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# ignore Minio,S3 unittes
MILVUS_DIR="${SCRIPTS_DIR}/../../internal/"
MILVUS_DIR="${SCRIPTS_DIR}/../internal/"
echo $MILVUS_DIR
echo go test "${MILVUS_DIR}/storage/internal/tikv/..." "${MILVUS_DIR}/reader/..." "${MILVUS_DIR}/writer/..." "${MILVUS_DIR}/master/..." "${MILVUS_DIR}/proxy/..." -failfast