Skip to content

Commit

Permalink
Update main.yaml for Github Action (milvus-io#6381)
Browse files Browse the repository at this point in the history
Signed-off-by: quicksilver <[email protected]>
  • Loading branch information
jeffoverflow authored Jul 9, 2021
1 parent 346e9cb commit da62886
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -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" },
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected])
Expand All @@ -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 ./...

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
2 changes: 2 additions & 0 deletions build/docker/builder/cpu/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/devcontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
2 changes: 2 additions & 0 deletions scripts/run_cpp_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit da62886

Please sign in to comment.