From d024f48af0b2013b4e9ea73ff7050a60a5ae3dc7 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 26 Dec 2023 15:58:21 +0000 Subject: [PATCH] Revert "ci(linux): install grpc from package manager" This reverts commit 004e3e308ee115a2f8be8dcca5adb14bd2ef2397. --- .github/workflows/release.yaml | 6 +++++- backend/cpp/llama/CMakeLists.txt | 13 +++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 59d5f56f7d99..e5fd84c425b7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,7 +34,11 @@ jobs: sudo apt-get update sudo apt-get install build-essential ffmpeg - sudo apt-get install -y protobuf-compiler-grpc grpc-proto libgrpc++-dev libgrpc++1 libgrpc-dev libabsl-dev libprotobuf-dev + git clone --recurse-submodules -b v1.58.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ + cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \ + -DgRPC_BUILD_TESTS=OFF \ + ../.. && sudo make -j12 install + - name: Build id: build env: diff --git a/backend/cpp/llama/CMakeLists.txt b/backend/cpp/llama/CMakeLists.txt index 56c465853ac0..7bf17871cc83 100644 --- a/backend/cpp/llama/CMakeLists.txt +++ b/backend/cpp/llama/CMakeLists.txt @@ -22,17 +22,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") include_directories("/opt/homebrew/include") endif() -include_directories(include) - +find_package(absl CONFIG REQUIRED) +find_package(Protobuf CONFIG REQUIRED) find_package(gRPC CONFIG REQUIRED) -find_package(PkgConfig REQUIRED) - -include(FindProtobuf) -find_package(Protobuf REQUIRED) -include_directories(${PROTOBUF_INCLUDE_DIR}) - -find_package(absl CONFIG REQUIRED) find_program(_PROTOBUF_PROTOC protoc) set(_GRPC_GRPCPP grpc++) find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) @@ -78,4 +71,4 @@ target_link_libraries(${TARGET} PRIVATE common llama myclip ${CMAKE_THREAD_LIBS_ target_compile_features(${TARGET} PRIVATE cxx_std_11) if(TARGET BUILD_INFO) add_dependencies(${TARGET} BUILD_INFO) -endif() +endif() \ No newline at end of file