blob: bd6fa4424e1a6287cb9ba301e55ade0310245eec [file] [log] [blame]
Jan Tattermusch320bd612015-09-15 12:44:35 -07001#!/bin/bash
2# Copyright 2015, Google Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met:
8#
9# * Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# * Redistributions in binary form must reproduce the above
12# copyright notice, this list of conditions and the following disclaimer
13# in the documentation and/or other materials provided with the
14# distribution.
15# * Neither the name of Google Inc. nor the names of its
16# contributors may be used to endorse or promote products derived from
17# this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30#
31# This script is invoked by run_jekins.sh. It contains the test logic
32# that should run inside a docker container.
33set -e
34
35mkdir -p /var/local/git
36git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
37
38cd /var/local/git/grpc
39nvm use 0.12
40rvm use ruby-2.1
41
42# TODO(jtattermusch): use cleaner way to install root certs
43mkdir -p /usr/local/share/grpc
44cp etc/roots.pem /usr/local/share/grpc/
45
46# build C++ interop client & server
47make interop_client interop_server
48
49# build C# interop client & server
50make install_grpc_csharp_ext
51(cd src/csharp && mono /var/local/NuGet.exe restore Grpc.sln)
52(cd src/csharp && xbuild Grpc.sln)
53
54# build Node interop client & server
55npm install -g node-gyp
56make install_c -C /var/local/git/grpc
57(cd src/node && npm install && node-gyp rebuild)
58
59# build Ruby interop client and server
60(cd src/ruby && gem update bundler && bundle && rake compile:grpc)
61
62# TODO(jtattermusch): add python
63
64# build PHP interop client
65# TODO(jtattermusch): make php work
66# TODO(jtattermusch): prerequisites should be installed sooner than here.
67# Install composer
68#curl -sS https://getcomposer.org/installer | php
69#mv composer.phar /usr/local/bin/composer
70# Download the patched PHP protobuf so that PHP gRPC clients can be generated
71# from proto3 schemas.
72#git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
73#(cd src/php/ext/grpc && phpize && ./configure && make)
74#rvm all do gem install ronn rake
75#(cd /var/local/git/protobuf-php \
76# && rvm all do rake pear:package version=1.0 \
77# && pear install Protobuf-1.0.tgz)
78#(cd src/php && composer install)
79#(cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto)
80
81# run the cloud-to-prod interop tests
82tools/run_tests/run_interop_tests.py -l $language