blob: 22e0ca9fa07629f81bcf54dbc9aada0f25ad3492 [file] [log] [blame]
Jan Tattermuschb2758442016-03-28 09:32:20 -07001#!/bin/bash
Jan Tattermusch7897ae92017-06-07 22:57:36 +02002# Copyright 2015 gRPC authors.
Jan Tattermuschb2758442016-03-28 09:32:20 -07003#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02004# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
Jan Tattermuschb2758442016-03-28 09:32:20 -07007#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02008# http://www.apache.org/licenses/LICENSE-2.0
Jan Tattermuschb2758442016-03-28 09:32:20 -07009#
Jan Tattermusch7897ae92017-06-07 22:57:36 +020010# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Jan Tattermuschb2758442016-03-28 09:32:20 -070015
Jan Tattermuschf3b523b2016-04-19 14:32:37 -070016source ~/.rvm/scripts/rvm
Jan Tattermuschb2758442016-03-28 09:32:20 -070017set -ex
18
Mehrdad Afshariea2b2e22018-01-25 11:03:09 -080019cd "$(dirname "$0")/../../.."
Jan Tattermuschb2758442016-03-28 09:32:20 -070020
Jan Tattermuschb2758442016-03-28 09:32:20 -070021CONFIG=${CONFIG:-opt}
22
Jan Tattermusch6dd74fc2016-04-04 14:16:10 -070023# build C++ qps worker & driver always - we need at least the driver to
24# run any of the scenarios.
Jan Tattermusch2de47cb2016-11-16 14:11:22 +010025# TODO(jtattermusch): C++ worker and driver are not buildable on Windows yet
26if [ "$OSTYPE" != "msys" ]
27then
28 # TODO(jtattermusch): not embedding OpenSSL breaks the C# build because
29 # grpc_csharp_ext needs OpenSSL embedded and some intermediate files from
30 # this build will be reused.
Mehrdad Afshariea2b2e22018-01-25 11:03:09 -080031 make CONFIG="${CONFIG}" EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_json_driver -j8
Jan Tattermusch2de47cb2016-11-16 14:11:22 +010032fi
Jan Tattermusch6dd74fc2016-04-04 14:16:10 -070033
ZhouyihaiDingd0153892017-09-28 15:00:15 -070034PHP_ALREADY_BUILT=""
Mehrdad Afshariea2b2e22018-01-25 11:03:09 -080035for language in "$@"
Craig Tiller7797e3f2016-04-01 07:41:05 -070036do
Jan Tattermuschde874a12016-04-18 09:21:37 -070037 case "$language" in
38 "c++")
39 ;; # C++ has already been built.
40 "java")
41 (cd ../grpc-java/ &&
42 ./gradlew -PskipCodegen=true :grpc-benchmarks:installDist)
43 ;;
Jan Tattermusch3b59b0f2016-05-10 14:44:05 -070044 "go")
45 tools/run_tests/performance/build_performance_go.sh
46 ;;
ZhouyihaiDingd0153892017-09-28 15:00:15 -070047 "php7"|"php7_protobuf_c")
48 if [ -n "$PHP_ALREADY_BUILT" ]; then
49 echo "Skipping PHP build as already built by $PHP_ALREADY_BUILT"
50 else
51 PHP_ALREADY_BUILT=$language
52 tools/run_tests/performance/build_performance_php7.sh
53 fi
54 ;;
Jan Tattermuschd13fbca2016-09-09 18:43:34 +020055 "csharp")
Mehrdad Afshariea2b2e22018-01-25 11:03:09 -080056 python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8 --compiler coreclr
Jan Tattermuschd13fbca2016-09-09 18:43:34 +020057 ;;
Jan Tattermuschde874a12016-04-18 09:21:37 -070058 *)
Mehrdad Afshariea2b2e22018-01-25 11:03:09 -080059 python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8
Jan Tattermuschde874a12016-04-18 09:21:37 -070060 ;;
61 esac
Craig Tiller7797e3f2016-04-01 07:41:05 -070062done