Skip to content

Commit a5076e4

Browse files
authored
Fix cmake typo (#274)
Signed-off-by: yhmo <[email protected]>
1 parent f5760ce commit a5076e4

File tree

4 files changed

+52
-11
lines changed

4 files changed

+52
-11
lines changed

.github/mergify.yml

+38-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
1+
misc:
2+
- branch: &BRANCHES
3+
# In this pull request, the changes are based on the master branch
4+
- &MASTER_BRANCH base=master
5+
# In this pull request, the changes are based on the 2.x(or 2.x.x) branch
6+
- &2X_BRANCH base~=^2(\.\d+){1,2}$
7+
18
pull_request_rules:
9+
- name: Add needs-dco label when DCO check failed
10+
conditions:
11+
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
12+
- or: *BRANCHES
13+
- -status-success=DCO
14+
actions:
15+
label:
16+
remove:
17+
- dco-passed
18+
add:
19+
- needs-dco
20+
comment:
21+
message: |
22+
@{{author}} Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.
23+
24+
- name: Add dco-passed label when DCO check passed
25+
conditions:
26+
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
27+
- or: *BRANCHES
28+
- status-success=DCO
29+
actions:
30+
label:
31+
remove:
32+
- needs-dco
33+
add:
34+
- dco-passed
35+
236
- name: Test passed for code changed
337
conditions:
4-
- base=master
38+
- or: *BRANCHES
539
- "status-success=Build and test AMD64 Ubuntu 20.04"
640
- "status-success=Build and test AMD64 Ubuntu 22.04"
741
- "status-success=Build and test AMD64 Fedora 38"
@@ -15,7 +49,7 @@ pull_request_rules:
1549

1650
- name: Remove ci-passed when build failed
1751
conditions:
18-
- base=master
52+
- or: *BRANCHES
1953
- or:
2054
- "check-failure=Build and test AMD64 Ubuntu 20.04"
2155
- "check-failure=Build and test AMD64 Ubuntu 22.04"
@@ -30,14 +64,12 @@ pull_request_rules:
3064

3165
- name: Add ci-passed when no code changes
3266
conditions:
33-
- base=master
67+
- or: *BRANCHES
3468
- or:
3569
# all path not in source pattern
3670
# try keep same as in .github/workflows/main.yaml
3771
- and:
38-
- -files~=^(cmake|examples|scripts|src|test|thirdparty)\/.*$
39-
- -files~=^\.github\/workflows\/main.yaml$
40-
- -files~=^\.clang-(tidy|format)$
72+
- -files~=^(cmake|examples|doc/thirdparty)\/.*$
4173
# only .md files changed
4274
- -files~=^.*(?<!\.md)$
4375
actions:

cmake/MilvusProtoGen.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ set(PROTO_BINARY_DIR "${milvus_proto_BINARY_DIR}")
3232
set(PROTO_IMPORT_DIR "${milvus_proto_SOURCE_DIR}/proto")
3333

3434
# resolve protoc, always use the protoc in the build tree
35-
set(Protobuf_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
35+
set(Protobuf_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
3636
message(STATUS "using protoc: ${Protobuf_PROTOC_EXECUTABLE}")
3737

3838
# resolve grpc_cpp_plugin
39-
set(GRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)
39+
set(GRPC_CPP_PLUGIN $<TARGET_FILE:gRPC::grpc_cpp_plugin>)
4040
message(STATUS "using grpc_cpp_plugin: ${GRPC_CPP_PLUGIN}")
4141

4242

cmake/ThirdPartyPackages.cmake

+11-2
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,40 @@ include(FetchContent)
2121
set(GRPC_VERSION 1.49.1)
2222
set(NLOHMANN_JSON_VERSION 3.11.3)
2323
set(GOOGLETEST_VERSION 1.12.1)
24+
Set(FETCHCONTENT_QUIET FALSE)
2425

2526
# grpc
2627
FetchContent_Declare(
2728
grpc
2829
GIT_REPOSITORY https://github.com/grpc/grpc.git
2930
GIT_TAG v${GRPC_VERSION}
31+
GIT_SHALLOW TRUE
32+
GIT_PROGRESS TRUE
3033
)
3134

3235
# nlohmann_json
3336
FetchContent_Declare(
3437
nlohmann_json
3538
GIT_REPOSITORY https://github.com/nlohmann/json.git
3639
GIT_TAG v${NLOHMANN_JSON_VERSION}
40+
GIT_SHALLOW TRUE
41+
GIT_PROGRESS TRUE
3742
)
3843

3944
# googletest
4045
FetchContent_Declare(
4146
googletest
4247
GIT_REPOSITORY https://github.com/google/googletest.git
4348
GIT_TAG release-${GOOGLETEST_VERSION}
49+
GIT_SHALLOW TRUE
50+
GIT_PROGRESS TRUE
4451
)
4552

4653

4754
# grpc
48-
if ("${MILVUS_WITH_GRPC}" STREQUAL "pakcage")
49-
find_package(grpc REQUIRED)
55+
if ("${MILVUS_WITH_GRPC}" STREQUAL "package")
56+
find_package(Protobuf REQUIRED)
57+
find_package(gRPC REQUIRED)
5058
else ()
5159
if (WIN32)
5260
set(OPENSSL_NO_ASM_TXT "YES")
@@ -66,6 +74,7 @@ else ()
6674
set(ABSL_PROPAGATE_CXX_STD ON CACHE INTERNAL "")
6775
add_subdirectory(${grpc_SOURCE_DIR} ${grpc_BINARY_DIR} EXCLUDE_FROM_ALL)
6876
add_library(gRPC::grpc++ ALIAS grpc++)
77+
add_executable(gRPC::grpc_cpp_plugin ALIAS grpc_cpp_plugin)
6978
endif ()
7079
endif ()
7180

test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src/impl)
1919
include_directories(${milvus_proto_BINARY_DIR})
2020

2121
# resolve gtest
22-
if ("${MILVUS_WITH_GTEST}" STREQUAL "pakcage")
22+
if ("${MILVUS_WITH_GTEST}" STREQUAL "package")
2323
find_package(GTest REQUIRED)
2424
else ()
2525
if (NOT googletest_POPULATED)

0 commit comments

Comments
 (0)