forked from grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c95bfef
commit 5adb71f
Showing
14 changed files
with
1,970 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
%YAML 1.2 | ||
--- | | ||
PHP_ARG_ENABLE(grpc, whether to enable grpc support, | ||
[ --enable-grpc Enable grpc support]) | ||
|
||
if test "$PHP_GRPC" != "no"; then | ||
dnl Write more examples of tests here... | ||
|
||
dnl # --with-grpc -> add include path | ||
PHP_ADD_INCLUDE(../../grpc/include) | ||
PHP_ADD_INCLUDE(../../grpc/src/php/ext/grpc) | ||
PHP_ADD_INCLUDE(../../grpc/third_party/boringssl/include) | ||
|
||
PHP_ADD_LIBRARY(pthread) | ||
|
||
PHP_NEW_EXTENSION(grpc, | ||
% for source in php_config_m4.src: | ||
${source} ${"\\"} | ||
% endfor | ||
% for lib in libs: | ||
% if lib.name in php_config_m4.get('deps', []): | ||
% for source in lib.src: | ||
${source} ${"\\"} | ||
% endfor | ||
% endif | ||
% endfor | ||
, $ext_shared, , -Wall -Werror -std=c11 ${"\\"} | ||
-fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"} | ||
-D_HAS_EXCEPTIONS=0 -DNOMINMAX) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
%YAML 1.2 | ||
--- | | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package packagerversion="1.9.5" version="2.0" xmlns="http:https://pear.php.net/dtd/package-2.0" xmlns:tasks="http:https://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:https://pear.php.net/dtd/tasks-1.0 http:https://pear.php.net/dtd/tasks-1.0.xsd http:https://pear.php.net/dtd/package-2.0 http:https://pear.php.net/dtd/package-2.0.xsd"> | ||
<name>grpc</name> | ||
<channel>pecl.php.net</channel> | ||
<summary>A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.</summary> | ||
<description>Remote Procedure Calls (RPCs) provide a useful abstraction for building distributed applications and services. The libraries in this repository provide a concrete implementation of the gRPC protocol, layered over HTTP/2. These libraries enable communication between clients and servers using any combination of the supported languages.</description> | ||
<lead> | ||
<name>Stanley Cheung</name> | ||
<user>stanleycheung</user> | ||
<email>[email protected]</email> | ||
<active>yes</active> | ||
</lead> | ||
<%! from time import strftime %><date>${"%Y-%m-%d" | strftime}</date> | ||
<time>16:06:07</time> | ||
<version> | ||
<release>0.8.0</release> | ||
<api>0.8.0</api> | ||
</version> | ||
<stability> | ||
<release>beta</release> | ||
<api>beta</api> | ||
</stability> | ||
<license>BSD</license> | ||
<notes> | ||
- Simplify gRPC PHP installation #4517 | ||
</notes> | ||
<contents> | ||
<dir baseinstalldir="/" name="/"> | ||
<file baseinstalldir="/" name="config.m4" role="src" /> | ||
<file baseinstalldir="/" name="src/php/ext/grpc/CREDITS" role="src" /> | ||
<file baseinstalldir="/" name="src/php/ext/grpc/LICENSE" role="src" /> | ||
<file baseinstalldir="/" name="src/php/ext/grpc/README.md" role="src" /> | ||
% for source in php_config_m4.src + php_config_m4.headers: | ||
<file baseinstalldir="/" name="${source}" role="src" /> | ||
% endfor | ||
% for lib in libs: | ||
% if lib.name in php_config_m4.get('deps', []): | ||
% for source in lib.get('public_headers', []) + lib.headers + lib.src: | ||
<file baseinstalldir="/" name="${source}" role="src" /> | ||
% endfor | ||
% endif | ||
% endfor | ||
</dir> | ||
</contents> | ||
<dependencies> | ||
<required> | ||
<php> | ||
<min>5.5.0</min> | ||
</php> | ||
<pearinstaller> | ||
<min>1.4.0</min> | ||
</pearinstaller> | ||
</required> | ||
</dependencies> | ||
<providesextension>grpc</providesextension> | ||
<extsrcrelease /> | ||
<changelog> | ||
<release> | ||
<version> | ||
<release>0.5.0</release> | ||
<api>0.5.0</api> | ||
</version> | ||
<stability> | ||
<release>alpha</release> | ||
<api>alpha</api> | ||
</stability> | ||
<date>2015-06-16</date> | ||
<license>BSD</license> | ||
<notes> | ||
First alpha release | ||
</notes> | ||
</release> | ||
<release> | ||
<version> | ||
<release>0.5.1</release> | ||
<api>0.5.1</api> | ||
</version> | ||
<stability> | ||
<release>alpha</release> | ||
<api>alpha</api> | ||
</stability> | ||
<date>2015-07-09</date> | ||
<license>BSD</license> | ||
<notes> | ||
Update to wrap gRPC C Core version 0.10.0 | ||
</notes> | ||
</release> | ||
<release> | ||
<version> | ||
<release>0.6.0</release> | ||
<api>0.6.0</api> | ||
</version> | ||
<stability> | ||
<release>beta</release> | ||
<api>beta</api> | ||
</stability> | ||
<date>2015-09-24</date> | ||
<license>BSD</license> | ||
<notes> | ||
- support per message compression disable | ||
- expose per-call host override option | ||
- expose connectivity API | ||
- expose channel target and call peer | ||
- add user-agent | ||
- update to wrap gRPC C core library beta version 0.11.0 | ||
</notes> | ||
</release> | ||
<release> | ||
<version> | ||
<release>0.6.1</release> | ||
<api>0.6.0</api> | ||
</version> | ||
<stability> | ||
<release>beta</release> | ||
<api>beta</api> | ||
</stability> | ||
<date>2015-10-21</date> | ||
<license>BSD</license> | ||
<notes> | ||
- fixed undefined constant fatal error when run with apache/nginx #2275 | ||
</notes> | ||
</release> | ||
<release> | ||
<version> | ||
<release>0.7.0</release> | ||
<api>0.7.0</api> | ||
</version> | ||
<stability> | ||
<release>beta</release> | ||
<api>beta</api> | ||
</stability> | ||
<date>2016-01-13</date> | ||
<license>BSD</license> | ||
<notes> | ||
- Breaking change to Credentials class (removed) #3765 | ||
- Replaced by ChannelCredentials and CallCredentials class #3765 | ||
- New plugin based metadata auth API #4394 | ||
- Explicit ChannelCredentials::createInsecure() call | ||
</notes> | ||
</release> | ||
<release> | ||
<version> | ||
<release>0.8.0</release> | ||
<api>0.8.0</api> | ||
</version> | ||
<stability> | ||
<release>beta</release> | ||
<api>beta</api> | ||
</stability> | ||
<date>${"%Y-%m-%d" | strftime}</date> | ||
<license>BSD</license> | ||
<notes> | ||
- Simplify gRPC PHP installation #4517 | ||
</notes> | ||
</release> | ||
</changelog> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
$channel = new Grpc\Channel('localhost:1000', [ | ||
'credentials' => Grpc\ChannelCredentials::createInsecure() | ||
]); | ||
|
||
$deadline = Grpc\Timeval::infFuture(); | ||
$call = new Grpc\Call($channel, | ||
'dummy_method', | ||
$deadline); | ||
|
||
$call->cancel(); | ||
$channel->close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# Copyright 2015-2016, Google Inc. | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are | ||
# met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following disclaimer | ||
# in the documentation and/or other materials provided with the | ||
# distribution. | ||
# * Neither the name of Google Inc. nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
set -ex | ||
|
||
cd $(dirname $0) | ||
|
||
cp -r $EXTERNAL_GIT_ROOT/input_artifacts/grpc-php.tgz . | ||
|
||
pecl install grpc-php.tgz | ||
|
||
php -d extension=grpc.so -d max_execution_time=300 distribtest.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2015-2016, Google Inc. | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are | ||
# met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following disclaimer | ||
# in the documentation and/or other materials provided with the | ||
# distribution. | ||
# * Neither the name of Google Inc. nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
FROM debian:jessie | ||
|
||
RUN apt-get update && apt-get install -y php5 php5-dev php-pear phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# Copyright 2016, Google Inc. | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are | ||
# met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following disclaimer | ||
# in the documentation and/or other materials provided with the | ||
# distribution. | ||
# * Neither the name of Google Inc. nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
PHP_TARGET_ARCH=$1 | ||
set -ex | ||
|
||
cd $(dirname $0)/../.. | ||
|
||
mkdir -p artifacts | ||
|
||
pear package | ||
|
||
cp -r grpc-*.tgz artifacts/grpc-php.tgz |
Oops, something went wrong.