mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
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>
This commit is contained in:
parent
e0baf1536e
commit
fdefcff84a
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@ -76,7 +76,7 @@ jobs:
|
|||||||
docker-compose up -d pulsar etcd minio
|
docker-compose up -d pulsar etcd minio
|
||||||
- name: Build and UnitTest
|
- name: Build and UnitTest
|
||||||
run: |
|
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
|
- name: Get the status & restart count for containers when ut failed
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
15
Makefile
15
Makefile
@ -22,6 +22,7 @@ ARCH := $(shell arch)
|
|||||||
mode = Release
|
mode = Release
|
||||||
disk_index = OFF
|
disk_index = OFF
|
||||||
|
|
||||||
|
|
||||||
export GIT_BRANCH=master
|
export GIT_BRANCH=master
|
||||||
|
|
||||||
milvus: build-cpp print-build-info
|
milvus: build-cpp print-build-info
|
||||||
@ -46,14 +47,19 @@ tools/bin/revive: tools/check/go.mod
|
|||||||
cppcheck:
|
cppcheck:
|
||||||
@(env bash ${PWD}/scripts/core_build.sh -l)
|
@(env bash ${PWD}/scripts/core_build.sh -l)
|
||||||
|
|
||||||
generated-proto-go: export protoc:=${PWD}/cmake_build/thirdparty/protobuf/protobuf-build/protoc
|
# put generate proto as a separated target because build cpp have different cases like with unittest.
|
||||||
generated-proto-go: build-cpp
|
generated-proto-go-without-cpp: export protoc:=${PWD}/cmake_build/thirdparty/protobuf/protobuf-build/protoc
|
||||||
|
generated-proto-go-without-cpp:
|
||||||
@mkdir -p ${GOPATH}/bin
|
@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)
|
@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)
|
@(env bash $(PWD)/scripts/proto_gen_go.sh)
|
||||||
|
|
||||||
check-proto-product: generated-proto-go
|
generated-proto-go: build-cpp generated-proto-go-without-cpp
|
||||||
|
|
||||||
|
check-proto-product-only:
|
||||||
@(env bash $(PWD)/scripts/check_proto_product.sh)
|
@(env bash $(PWD)/scripts/check_proto_product.sh)
|
||||||
|
check-proto-product: generated-proto-go check-proto-product-only
|
||||||
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
ifdef GO_DIFF_FILES
|
ifdef GO_DIFF_FILES
|
||||||
@ -289,3 +295,6 @@ mock-datanode:
|
|||||||
|
|
||||||
mock-tnx-kv:
|
mock-tnx-kv:
|
||||||
mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=TxnKV.go --with-expecter
|
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…
x
Reference in New Issue
Block a user