mirror of https://github.com/milvus-io/milvus.git
Refactor Makefile to reduce duplicate steps for ci-ut (#20288)
Signed-off-by: Jenny Li <jing.li@zilliz.com> Signed-off-by: Jenny Li <jing.li@zilliz.com>pull/20292/head
parent
e0baf1536e
commit
fdefcff84a
|
@ -76,7 +76,7 @@ jobs:
|
|||
docker-compose up -d pulsar etcd minio
|
||||
- name: Build and UnitTest
|
||||
run: |
|
||||
./build/builder.sh /bin/bash -c "make check-proto-product && make codecov"
|
||||
./build/builder.sh /bin/bash -c "make ci-ut"
|
||||
- name: Get the status & restart count for containers when ut failed
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
|
|
17
Makefile
17
Makefile
|
@ -22,6 +22,7 @@ ARCH := $(shell arch)
|
|||
mode = Release
|
||||
disk_index = OFF
|
||||
|
||||
|
||||
export GIT_BRANCH=master
|
||||
|
||||
milvus: build-cpp print-build-info
|
||||
|
@ -46,14 +47,19 @@ 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: build-cpp
|
||||
# put generate proto as a separated target because build cpp have different cases like with unittest.
|
||||
generated-proto-go-without-cpp: export protoc:=${PWD}/cmake_build/thirdparty/protobuf/protobuf-build/protoc
|
||||
generated-proto-go-without-cpp:
|
||||
@mkdir -p ${GOPATH}/bin
|
||||
@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && cd /tmp && go install github.com/golang/protobuf/protoc-gen-go@v1.3.2)
|
||||
@(env bash $(PWD)/scripts/proto_gen_go.sh)
|
||||
|
||||
check-proto-product: generated-proto-go
|
||||
@(env bash $(PWD)/scripts/check_proto_product.sh)
|
||||
generated-proto-go: build-cpp generated-proto-go-without-cpp
|
||||
|
||||
check-proto-product-only:
|
||||
@(env bash $(PWD)/scripts/check_proto_product.sh)
|
||||
check-proto-product: generated-proto-go check-proto-product-only
|
||||
|
||||
|
||||
fmt:
|
||||
ifdef GO_DIFF_FILES
|
||||
|
@ -289,3 +295,6 @@ mock-datanode:
|
|||
|
||||
mock-tnx-kv:
|
||||
mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=TxnKV.go --with-expecter
|
||||
|
||||
|
||||
ci-ut: build-cpp-with-coverage generated-proto-go-without-cpp codecov-cpp codecov-go
|
||||
|
|
Loading…
Reference in New Issue