mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+grpc (#1829)
* +grpc * add some fixes * Update package.yml * do we... not except just >? * pkg-config * get git submodules * use git checkout * fix test/provides * yml formatting * Formatting * -lcares * remove patch * fix tests * le sigh * maaaaaaaaaan --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
25ac3f6329
commit
de25343fb2
1 changed files with 91 additions and 0 deletions
91
projects/grpc.io/package.yml
Normal file
91
projects/grpc.io/package.yml
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
distributable:
|
||||||
|
url: git+https://github.com/grpc/grpc
|
||||||
|
ref: v{{version}}
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: grpc/grpc
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/grpc_csharp_plugin
|
||||||
|
- bin/grpc_node_plugin
|
||||||
|
- bin/grpc_cpp_plugin
|
||||||
|
- bin/grpc_python_plugin
|
||||||
|
- bin/grpc_objective_c_plugin
|
||||||
|
- bin/grpc_ruby_plugin
|
||||||
|
- bin/grpc_php_plugin
|
||||||
|
- bin/grpc_cli
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
abseil.io: '*'
|
||||||
|
c-ares.org: '*'
|
||||||
|
openssl.org: ^1.1
|
||||||
|
protobuf.dev: '>=22.3'
|
||||||
|
github.com/google/re2: '*'
|
||||||
|
zlib.net: '*'
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
gnu.org/autoconf: '*'
|
||||||
|
gnu.org/automake: '*'
|
||||||
|
gnu.org/libtool: '*'
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
cmake.org: ^3
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
freedesktop.org/pkg-config: ^0
|
||||||
|
git-scm.org: ^2
|
||||||
|
working-directory: cmake/build
|
||||||
|
script:
|
||||||
|
- run: git submodule update --init --recursive
|
||||||
|
working-directory: ../..
|
||||||
|
|
||||||
|
- cmake $COMMON_ARGS $ARGS ../..
|
||||||
|
- make install
|
||||||
|
|
||||||
|
# Build the cli
|
||||||
|
- cmake $COMMON_ARGS $CLI_ARGS ../..
|
||||||
|
- make grpc_cli
|
||||||
|
|
||||||
|
- cp grpc_cli "{{prefix}}/bin"
|
||||||
|
- cp libgrpc++_test_config.* "{{prefix}}/lib"
|
||||||
|
|
||||||
|
- run: install_name_tool -add_rpath @loader_path libgrpc++_test_config.dylib
|
||||||
|
working-directory: "{{prefix}}/lib"
|
||||||
|
if: darwin
|
||||||
|
env:
|
||||||
|
COMMON_ARGS:
|
||||||
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
|
||||||
|
- -DCMAKE_INSTALL_RPATH={{prefix}}
|
||||||
|
- -DBUILD_SHARED_LIBS=ON
|
||||||
|
ARGS:
|
||||||
|
- -DCMAKE_CXX_STANDARD=17
|
||||||
|
- -DCMAKE_CXX_STANDARD_REQUIRED=TRUE
|
||||||
|
- -DgRPC_BUILD_TESTS=OFF
|
||||||
|
- -DgRPC_INSTALL=ON
|
||||||
|
- -DgRPC_ABSL_PROVIDER=package
|
||||||
|
- -DgRPC_CARES_PROVIDER=package
|
||||||
|
- -DgRPC_PROTOBUF_PROVIDER=package
|
||||||
|
- -DgRPC_SSL_PROVIDER=package
|
||||||
|
- -DgRPC_ZLIB_PROVIDER=package
|
||||||
|
- -DgRPC_RE2_PROVIDER=package
|
||||||
|
CLI_ARGS:
|
||||||
|
- -DgRPC_BUILD_TESTS=ON
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
freedesktop.org/pkg-config: ^0
|
||||||
|
fixture: |
|
||||||
|
#include <grpc/grpc.h>
|
||||||
|
int main() {
|
||||||
|
grpc_init();
|
||||||
|
grpc_shutdown();
|
||||||
|
return GRPC_STATUS_OK;
|
||||||
|
}
|
||||||
|
script:
|
||||||
|
- cp $FIXTURE test.cpp
|
||||||
|
- PKG_CONFIG=$(pkg-config --cflags --libs libcares protobuf re2 grpc++)
|
||||||
|
- cc $PKG_CONFIG test.cpp -o test
|
||||||
|
- ./test
|
||||||
|
|
||||||
|
- (grpc_cli ls localhost:58931 2>&1 || true) | grep "failed to connect to all addresses"
|
Loading…
Reference in a new issue