ci(linux): install grpc from package manager

This commit is contained in:
Ettore Di Giacinto 2023-12-26 14:18:39 +00:00
parent a8b4999e64
commit 004e3e308e
2 changed files with 12 additions and 9 deletions

View File

@ -30,11 +30,7 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential ffmpeg sudo apt-get install build-essential ffmpeg
git clone --recurse-submodules -b v1.58.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ sudo apt-get install -y protobuf-compiler-grpc grpc-proto libgrpc++-dev libgrpc++1 libgrpc-dev libabsl-dev libprotobuf-dev
cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
../.. && sudo make -j12 install
- name: Build - name: Build
id: build id: build
env: env:

View File

@ -22,10 +22,17 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
include_directories("/opt/homebrew/include") include_directories("/opt/homebrew/include")
endif() endif()
find_package(absl CONFIG REQUIRED) include_directories(include)
find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC 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) find_program(_PROTOBUF_PROTOC protoc)
set(_GRPC_GRPCPP grpc++) set(_GRPC_GRPCPP grpc++)
find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin) find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin)