diff --git a/CHANGELOG.md b/CHANGELOG.md index 02fb05d9cc26b4b97b3ac99ae5f20530e5154621..6ee8bfef0ddafbe8c4fdc796ff68233a2098f7c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Please mark all change in change log and use the ticket from JIRA. ## Bug - \#246 - Exclude src/external folder from code coverage for jenkin ci +- \#248 - Reside src/external in thirdparty ## Feature - \#12 - Pure CPU version for Milvus diff --git a/ci/jenkins/scripts/coverage.sh b/ci/jenkins/scripts/coverage.sh index 5c9d010d4690f9bc6b1be698191534f2e2588667..fa4fd7649031ef53e4701fa2f7fc368ed2c8fdd9 100755 --- a/ci/jenkins/scripts/coverage.sh +++ b/ci/jenkins/scripts/coverage.sh @@ -132,7 +132,7 @@ ${LCOV_CMD} -r "${FILE_INFO_OUTPUT}" -o "${FILE_INFO_OUTPUT_NEW}" \ "*/src/server/Server.cpp" \ "*/src/server/DBWrapper.cpp" \ "*/src/server/grpc_impl/GrpcServer.cpp" \ - "*/src/external/*" + "*/thirdparty/*" if [ $? -ne 0 ]; then echo "gen ${FILE_INFO_OUTPUT_NEW} failed" diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 65094b19a361232afb7d4eaa457f6f345d00b5b4..11e417397ba854fc1e27f442fd7ff3a1aed9eaf9 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -112,6 +112,7 @@ endif () set(MILVUS_SOURCE_DIR ${PROJECT_SOURCE_DIR}) set(MILVUS_BINARY_DIR ${PROJECT_BINARY_DIR}) set(MILVUS_ENGINE_SRC ${PROJECT_SOURCE_DIR}/src) +set(MILVUS_THIRDPARTY_SRC ${PROJECT_SOURCE_DIR}/thirdparty) include(ExternalProject) include(DefineOptions) diff --git a/core/build-support/lint_exclusions.txt b/core/build-support/lint_exclusions.txt index 2be060f121c02203857ea71e9c96266fe0418b2f..34d469fccb6375d1f92655d929ce46d199496f9b 100644 --- a/core/build-support/lint_exclusions.txt +++ b/core/build-support/lint_exclusions.txt @@ -6,5 +6,5 @@ *easylogging++* *SqliteMetaImpl.cpp *src/grpc* -*src/external* +*thirdparty* *milvus/include* \ No newline at end of file diff --git a/core/coverage.sh b/core/coverage.sh index 9011e290e5f5d267fd42b58db14488a557f2d1a6..833b1b0050143e2b2aeddf4507c07a1b57f4b4f3 100755 --- a/core/coverage.sh +++ b/core/coverage.sh @@ -122,7 +122,7 @@ ${LCOV_CMD} -r "${FILE_INFO_OUTPUT}" -o "${FILE_INFO_OUTPUT_NEW}" \ "*/src/server/Server.cpp" \ "*/src/server/DBWrapper.cpp" \ "*/src/server/grpc_impl/GrpcServer.cpp" \ - "*/src/external/*" + "*/thirdparty/*" if [ $? -ne 0 ]; then echo "generate ${FILE_INFO_OUTPUT_NEW} failed" diff --git a/core/src/CMakeLists.txt b/core/src/CMakeLists.txt index 79b5e0f1da8ef03a0757e6cc3f57660044396327..e0cc5d0855cc11a09ff3ef109a6221e9129d282b 100644 --- a/core/src/CMakeLists.txt +++ b/core/src/CMakeLists.txt @@ -19,6 +19,7 @@ include_directories(${MILVUS_SOURCE_DIR}) include_directories(${MILVUS_ENGINE_SRC}) +include_directories(${MILVUS_THIRDPARTY_SRC}) include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-status) include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-milvus) @@ -65,11 +66,11 @@ set(scheduler_files ${scheduler_task_files} ) -aux_source_directory(${MILVUS_ENGINE_SRC}/external/easyloggingpp external_easyloggingpp_files) -aux_source_directory(${MILVUS_ENGINE_SRC}/external/nlohmann external_nlohmann_files) -set(external_files - ${external_easyloggingpp_files} - ${external_nlohmann_files} +aux_source_directory(${MILVUS_THIRDPARTY_SRC}/easyloggingpp thirdparty_easyloggingpp_files) +aux_source_directory(${MILVUS_THIRDPARTY_SRC}/nlohmann thirdparty_nlohmann_files) +set(thirdparty_files + ${thirdparty_easyloggingpp_files} + ${thirdparty_nlohmann_files} ) aux_source_directory(${MILVUS_ENGINE_SRC}/server server_files) @@ -85,7 +86,7 @@ set(engine_files ${db_insert_files} ${db_meta_files} ${metrics_files} - ${external_files} + ${thirdparty_files} ${utils_files} ${wrapper_files} ) diff --git a/core/src/index/knowhere/knowhere/common/Log.h b/core/src/index/knowhere/knowhere/common/Log.h index 369e7143af8cce1f1437d7d39819462e34333e50..e50a28a15e62401c9ae34b7c7425d1b02e640521 100644 --- a/core/src/index/knowhere/knowhere/common/Log.h +++ b/core/src/index/knowhere/knowhere/common/Log.h @@ -17,7 +17,7 @@ #pragma once -#include "external/easyloggingpp/easylogging++.h" +#include "easyloggingpp/easylogging++.h" namespace knowhere { diff --git a/core/src/index/unittest/CMakeLists.txt b/core/src/index/unittest/CMakeLists.txt index 13277aa40eeef12460b58770e550b3a43b27bfae..d27c7e886071d84025c21922725cf36f6d1f1e2c 100644 --- a/core/src/index/unittest/CMakeLists.txt +++ b/core/src/index/unittest/CMakeLists.txt @@ -27,7 +27,7 @@ set(basic_libs ) set(util_srcs - ${MILVUS_ENGINE_SRC}/external/easyloggingpp/easylogging++.cc + ${MILVUS_THIRDPARTY_SRC}/easyloggingpp/easylogging++.cc ${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp ${INDEX_SOURCE_DIR}/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp ${INDEX_SOURCE_DIR}/knowhere/knowhere/adapter/Structure.cpp diff --git a/core/src/main.cpp b/core/src/main.cpp index c5b2d2dffe2565e4fd8dc662ae8d8841b02cea59..401736c34fe9b83bc291ce944d617ed7a88db56d 100644 --- a/core/src/main.cpp +++ b/core/src/main.cpp @@ -22,7 +22,7 @@ #include #include -#include "external/easyloggingpp/easylogging++.h" +#include "easyloggingpp/easylogging++.h" #include "metrics/Metrics.h" #include "server/Server.h" #include "src/config.h" diff --git a/core/src/utils/Json.h b/core/src/utils/Json.h index e5e74a3b673e082bc2ba12086925a0a9e01d2201..235d6ac9c15f0ed01d207f5648cbcf308f4f20d6 100644 --- a/core/src/utils/Json.h +++ b/core/src/utils/Json.h @@ -16,7 +16,7 @@ // under the License. #pragma once -#include "external/nlohmann/json.hpp" +#include "nlohmann/json.hpp" namespace milvus { using json = nlohmann::json; diff --git a/core/src/utils/Log.h b/core/src/utils/Log.h index 4aa3146b011b63469250c33fffef184f12f3c34f..cef72a866d33455da6373692d8f667d4acddf156 100644 --- a/core/src/utils/Log.h +++ b/core/src/utils/Log.h @@ -17,7 +17,7 @@ #pragma once -#include "external/easyloggingpp/easylogging++.h" +#include "easyloggingpp/easylogging++.h" namespace milvus { diff --git a/core/src/utils/LogUtil.h b/core/src/utils/LogUtil.h index 7e5afd087a3532bc39845daac3a0f9125ebb1f78..69607c4631d2be8c383c5d15a637269df81c82e9 100644 --- a/core/src/utils/LogUtil.h +++ b/core/src/utils/LogUtil.h @@ -17,7 +17,7 @@ #pragma once -#include "external/easyloggingpp/easylogging++.h" +#include "easyloggingpp/easylogging++.h" #include "utils/Status.h" #include diff --git a/core/src/external/easyloggingpp/easylogging++.cc b/core/thirdparty/easyloggingpp/easylogging++.cc similarity index 100% rename from core/src/external/easyloggingpp/easylogging++.cc rename to core/thirdparty/easyloggingpp/easylogging++.cc diff --git a/core/src/external/easyloggingpp/easylogging++.h b/core/thirdparty/easyloggingpp/easylogging++.h similarity index 100% rename from core/src/external/easyloggingpp/easylogging++.h rename to core/thirdparty/easyloggingpp/easylogging++.h diff --git a/core/src/external/nlohmann/json.hpp b/core/thirdparty/nlohmann/json.hpp similarity index 100% rename from core/src/external/nlohmann/json.hpp rename to core/thirdparty/nlohmann/json.hpp diff --git a/core/unittest/CMakeLists.txt b/core/unittest/CMakeLists.txt index e485bd729ab8a8f199e96a102f3f788adb84764d..10ab362e776bfbf31b43332466fc23c59c022220 100644 --- a/core/unittest/CMakeLists.txt +++ b/core/unittest/CMakeLists.txt @@ -23,6 +23,7 @@ endforeach () include_directories(${MILVUS_SOURCE_DIR}) include_directories(${MILVUS_ENGINE_SRC}) +include_directories(${MILVUS_THIRDPARTY_SRC}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) aux_source_directory(${MILVUS_ENGINE_SRC}/cache cache_files) @@ -57,11 +58,11 @@ set(scheduler_files ${scheduler_optimizer_files} ) -aux_source_directory(${MILVUS_ENGINE_SRC}/external/easyloggingpp external_easyloggingpp_files) -aux_source_directory(${MILVUS_ENGINE_SRC}/external/nlohmann external_nlohmann_files) -set(external_files - ${external_easyloggingpp_files} - ${external_nlohmann_files} +aux_source_directory(${MILVUS_THIRDPARTY_SRC}/easyloggingpp thirdparty_easyloggingpp_files) +aux_source_directory(${MILVUS_THIRDPARTY_SRC}/nlohmann thirdparty_nlohmann_files) +set(thirdparty_files + ${thirdparty_easyloggingpp_files} + ${thirdparty_nlohmann_files} ) aux_source_directory(${MILVUS_ENGINE_SRC}/server server_files) @@ -79,7 +80,7 @@ set(helper_files ${MILVUS_ENGINE_SRC}/utils/Status.cpp ${MILVUS_ENGINE_SRC}/utils/StringHelpFunctions.cpp ${MILVUS_ENGINE_SRC}/utils/ValidationUtil.cpp - ${MILVUS_ENGINE_SRC}/external/easyloggingpp/easylogging++.cc + ${MILVUS_THIRDPARTY_SRC}/easyloggingpp/easylogging++.cc ) set(common_files @@ -90,7 +91,7 @@ set(common_files ${db_insert_files} ${db_meta_files} ${metrics_files} - ${external_files} + ${thirdparty_files} ${scheduler_files} ${wrapper_files} ${helper_files} diff --git a/core/unittest/main.cpp b/core/unittest/main.cpp index ff70f3f2cf67d8927b1df83eeab0618cd40a3a4e..7452b9582152364a08a8115545e37cac34e5178e 100644 --- a/core/unittest/main.cpp +++ b/core/unittest/main.cpp @@ -18,7 +18,7 @@ #include #include -#include "external/easyloggingpp/easylogging++.h" +#include "easyloggingpp/easylogging++.h" INITIALIZE_EASYLOGGINGPP diff --git a/core/unittest/wrapper/CMakeLists.txt b/core/unittest/wrapper/CMakeLists.txt index 232abf6e1a24df45abe801e4ea8ac17a546fac39..a320ef723df470fb4536230c53af1ae21b5945c9 100644 --- a/core/unittest/wrapper/CMakeLists.txt +++ b/core/unittest/wrapper/CMakeLists.txt @@ -32,7 +32,7 @@ set(wrapper_files set(util_files utils.cpp - ${MILVUS_ENGINE_SRC}/external/easyloggingpp/easylogging++.cc + ${MILVUS_THIRDPARTY_SRC}/easyloggingpp/easylogging++.cc ${MILVUS_ENGINE_SRC}/utils/Status.cpp ) diff --git a/core/unittest/wrapper/test_wrapper.cpp b/core/unittest/wrapper/test_wrapper.cpp index 097cb69075795b4cffe8041ad92d60288c9909e1..ddfdfa2fad47bf80ba87e5aa8bd64b2aba0dc664 100644 --- a/core/unittest/wrapper/test_wrapper.cpp +++ b/core/unittest/wrapper/test_wrapper.cpp @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#include "external/easyloggingpp/easylogging++.h" +#include "easyloggingpp/easylogging++.h" #include "wrapper/VecIndex.h" #ifdef MILVUS_GPU_VERSION