aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/config.m4.template44
-rw-r--r--templates/package.xml.template159
-rw-r--r--templates/tools/dockerfile/apt_get_basic.include3
-rw-r--r--templates/tools/dockerfile/run_tests_addons.include3
-rw-r--r--templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template45
-rw-r--r--templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template39
-rw-r--r--templates/tools/run_tests/sources_and_headers.json.template21
-rw-r--r--templates/vsprojects/protoc.props.template3
8 files changed, 310 insertions, 7 deletions
diff --git a/templates/config.m4.template b/templates/config.m4.template
new file mode 100644
index 0000000000..dbc12188dc
--- /dev/null
+++ b/templates/config.m4.template
@@ -0,0 +1,44 @@
+%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)
+
+ LIBS="-lpthread $LIBS"
+
+ GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD"
+ PHP_ADD_LIBRARY(pthread)
+
+ PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD)
+ PHP_ADD_LIBRARY(dl)
+
+ case $host in
+ *darwin*) ;;
+ *)
+ PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
+ PHP_ADD_LIBRARY(rt)
+ ;;
+ esac
+
+ 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
diff --git a/templates/package.xml.template b/templates/package.xml.template
new file mode 100644
index 0000000000..455b002e64
--- /dev/null
+++ b/templates/package.xml.template
@@ -0,0 +1,159 @@
+%YAML 1.2
+--- |
+ <?xml version="1.0" encoding="UTF-8"?>
+ <package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://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>grpc-packages@google.com</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>
diff --git a/templates/tools/dockerfile/apt_get_basic.include b/templates/tools/dockerfile/apt_get_basic.include
index 9237e7dace..547ce01a30 100644
--- a/templates/tools/dockerfile/apt_get_basic.include
+++ b/templates/tools/dockerfile/apt_get_basic.include
@@ -1,3 +1,4 @@
+<%page args="skip_golang=False"/>\
# Install Git and basic packages.
RUN apt-get update && apt-get install -y ${'\\'}
autoconf ${'\\'}
@@ -9,7 +10,9 @@ RUN apt-get update && apt-get install -y ${'\\'}
gcc ${'\\'}
gcc-multilib ${'\\'}
git ${'\\'}
+% if not skip_golang:
golang ${'\\'}
+% endif
gyp ${'\\'}
lcov ${'\\'}
libc6 ${'\\'}
diff --git a/templates/tools/dockerfile/run_tests_addons.include b/templates/tools/dockerfile/run_tests_addons.include
index 27ac67f5d8..30d22be298 100644
--- a/templates/tools/dockerfile/run_tests_addons.include
+++ b/templates/tools/dockerfile/run_tests_addons.include
@@ -1,7 +1,10 @@
+<%page args="skip_zookeeper=False"/>\
<%include file="ccache_setup.include"/>
+% if not skip_zookeeper:
#======================
# Zookeeper dependencies
# TODO(jtattermusch): is zookeeper still needed?
RUN apt-get install -y libzookeeper-mt-dev
+% endif
RUN mkdir /var/local/jenkins
diff --git a/templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template
new file mode 100644
index 0000000000..294ae00b4c
--- /dev/null
+++ b/templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template
@@ -0,0 +1,45 @@
+%YAML 1.2
+--- |
+ # 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:squeeze
+
+ <%include file="../../apt_get_basic.include" args="skip_golang=True"/>
+
+ # libgflags-dev is not available on squeezy
+ RUN apt-get update && apt-get -y install libgtest-dev libc++-dev clang && apt-get clean
+
+ RUN apt-get update && apt-get -y install python-pip && apt-get clean
+ RUN pip install argparse
+
+ <%include file="../../run_tests_addons.include" args="skip_zookeeper=True"/>
+ # Define the default command.
+ CMD ["bash"]
+ \ No newline at end of file
diff --git a/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template
new file mode 100644
index 0000000000..6b30274892
--- /dev/null
+++ b/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template
@@ -0,0 +1,39 @@
+%YAML 1.2
+--- |
+ # 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 ubuntu:16.04
+
+ <%include file="../../apt_get_basic.include"/>
+ <%include file="../../cxx_deps.include"/>
+ <%include file="../../run_tests_addons.include"/>
+ # Define the default command.
+ CMD ["bash"]
+ \ No newline at end of file
diff --git a/templates/tools/run_tests/sources_and_headers.json.template b/templates/tools/run_tests/sources_and_headers.json.template
index 04802772af..78363ff1fa 100644
--- a/templates/tools/run_tests/sources_and_headers.json.template
+++ b/templates/tools/run_tests/sources_and_headers.json.template
@@ -12,20 +12,27 @@
out.extend(fmt % name for fmt in ['%s.grpc.pb.h', '%s.pb.h'])
return out
- def no_protos(src):
+ def no_protos_filter(src):
+ return os.path.splitext(src)[1] != '.proto'
+
+ def no_third_party_filter(src):
+ return not src.startswith('third_party/')
+
+ def filter_srcs(srcs, filters):
out = []
- for f in src:
- if os.path.splitext(f)[1] != '.proto':
- out.append(f)
+ for s in srcs:
+ filter_passes = (f(s) for f in filters)
+ if all(filter_passes):
+ out.append(s)
return out
%>
${json.dumps([{"name": tgt.name,
"language": tgt.language,
"src": sorted(
- no_protos(tgt.src) +
- tgt.get('public_headers', []) +
- tgt.get('headers', [])),
+ filter_srcs(tgt.src, (no_protos_filter, no_third_party_filter)) +
+ filter_srcs(tgt.get('public_headers', []), (no_protos_filter, no_third_party_filter)) +
+ filter_srcs(tgt.get('headers', []), (no_third_party_filter,))),
"headers": sorted(
tgt.get('public_headers', []) +
tgt.get('headers', []) +
diff --git a/templates/vsprojects/protoc.props.template b/templates/vsprojects/protoc.props.template
index a869005dae..ced6028a4b 100644
--- a/templates/vsprojects/protoc.props.template
+++ b/templates/vsprojects/protoc.props.template
@@ -4,6 +4,9 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
+ <ClCompile>
+ <DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
<Link>
<AdditionalDependencies>libprotoc.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\..\third_party\protobuf\cmake\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>