Update main.yaml for Github Action (#6381)

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
pull/6400/head
quicksilver 2021-07-09 11:59:09 +08:00 committed by GitHub
parent 346e9cba4a
commit da628863bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{
"name": "Milvus Distributed Dev Container Definition",
"dockerComposeFile": ["./docker-compose-devcontainer.yml"],
"service": "ubuntu",
"service": "builder",
"initializeCommand": "scripts/devcontainer.sh",
"workspaceFolder": "/go/src/github.com/milvus-io/milvus",
"remoteEnv": { "GOPROXY": "https://goproxy.cn" },

2
.env
View File

@ -1,7 +1,7 @@
IMAGE_REPO=milvusdb
IMAGE_ARCH=amd64
OS_NAME=ubuntu18.04
DATE_VERSION=20210624-063026
DATE_VERSION=latest
LATEST_DATE_VERSION=latest
MINIO_ADDRESS=minio:9000
PULSAR_ADDRESS=pulsar://pulsar:6650

View File

@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: echo "::set-output name=version::$(date +%Y%m%d-%H%M%S)"
run: echo "::set-output name=version::$(date +%Y%m%d)"
- name: Docker Pull
shell: bash
run: |

View File

@ -33,7 +33,7 @@ tools/bin/revive: tools/check/go.mod
cppcheck:
@(env bash ${PWD}/scripts/core_build.sh -l)
generated-proto-go:export protoc:=${PWD}/cmake_build/thirdparty/protobuf/protobuf-build/protoc
generated-proto-go: export protoc:=${PWD}/cmake_build/thirdparty/protobuf/protobuf-build/protoc
generated-proto-go: build-cpp
@mkdir -p ${GOPATH}/bin
@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && go get github.com/golang/protobuf/protoc-gen-go@v1.3.2)
@ -53,7 +53,7 @@ else
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh tests/go/
endif
lint:tools/bin/revive
lint: tools/bin/revive
@echo "Running $@ check"
@tools/bin/revive -formatter friendly -config tools/check/revive.toml ./...
@ -97,19 +97,21 @@ milvus: build-cpp
build-go: milvus
build-cpp:
@echo "Building Milvus cpp library ..."
@(env bash $(PWD)/scripts/core_build.sh -f "$(CUSTOM_THIRDPARTY_PATH)")
@(env bash $(PWD)/scripts/cwrapper_build.sh -t Release -f "$(CUSTOM_THIRDPARTY_PATH)")
@(env bash $(PWD)/scripts/cwrapper_dablooms_build.sh -t Release -f "$(CUSTOM_THIRDPARTY_PATH)")
@(env bash $(PWD)/scripts/cwrapper_rocksdb_build.sh -t Release -f "$(CUSTOM_THIRDPARTY_PATH)")
build-cpp-with-unittest:
@echo "Building Milvus cpp library with unittest ..."
@(env bash $(PWD)/scripts/core_build.sh -u -f "$(CUSTOM_THIRDPARTY_PATH)")
@(env bash $(PWD)/scripts/cwrapper_build.sh -t Release -f "$(CUSTOM_THIRDPARTY_PATH)")
# Runs the tests.
unittest: test-cpp test-go
test-go:build-cpp
test-go: build-cpp
@echo "Running go unittests..."
@echo "disable go unittest for now, enable it later"
@(env bash $(PWD)/scripts/run_go_unittest.sh)

View File

@ -34,7 +34,7 @@ gid=$(id -g)
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-ccache"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-go-mod"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-thirdparty"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/thirdparty"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-vscode-extensions"
chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker}"

View File

@ -39,6 +39,8 @@ RUN source /etc/profile.d/devtoolset-7.sh && \
./b2 -j2 --prefix=/usr/local --without-python toolset=gcc install && \
cd ../ && rm -rf ./boost_1_65_1*
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
# Install Go
ENV GOPATH /go
ENV GOROOT /usr/local/go

View File

@ -28,7 +28,7 @@ services:
- .:/go/src/github.com/milvus-io/milvus:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-ccache:/ccache:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-go-mod:/go/pkg/mod:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-thirdparty:/tmp/thirdparty:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/thirdparty:/tmp/thirdparty:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
working_dir: "/go/src/github.com/milvus-io/milvus"
# Command

View File

@ -54,7 +54,7 @@ pushd "$ROOT_DIR"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-ccache"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-go-mod"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-thirdparty"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/thirdparty"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-${OS_NAME}-vscode-extensions"
chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker}"

View File

@ -27,6 +27,7 @@ for UNITTEST_DIR in "${UNITTEST_DIRS[@]}"; do
exit 1
fi
echo "Running all unittest ..."
${UNITTEST_DIR}/all_tests
if [ $? -ne 0 ]; then
echo ${UNITTEST_DIR}/all_tests "run failed"
@ -46,6 +47,7 @@ done
# run cwrapper unittest
if [ -f ${CWRAPPER_UNITTEST} ];then
echo "Running cwrapper unittest ..."
${CWRAPPER_UNITTEST}
if [ $? -ne 0 ]; then
echo ${CWRAPPER_UNITTEST} " run failed"