Jan Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 2 | # Copyright 2015 gRPC authors. |
Jan Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 3 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 4 | # 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 Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 7 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 9 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 10 | # 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 Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 15 | |
Jan Tattermusch | f3b523b | 2016-04-19 14:32:37 -0700 | [diff] [blame] | 16 | source ~/.rvm/scripts/rvm |
Jan Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 17 | set -ex |
| 18 | |
Mehrdad Afshari | ea2b2e2 | 2018-01-25 11:03:09 -0800 | [diff] [blame] | 19 | cd "$(dirname "$0")/../../.." |
Jan Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 20 | |
Jan Tattermusch | b275844 | 2016-03-28 09:32:20 -0700 | [diff] [blame] | 21 | CONFIG=${CONFIG:-opt} |
| 22 | |
Jan Tattermusch | 6dd74fc | 2016-04-04 14:16:10 -0700 | [diff] [blame] | 23 | # build C++ qps worker & driver always - we need at least the driver to |
| 24 | # run any of the scenarios. |
Jan Tattermusch | 2de47cb | 2016-11-16 14:11:22 +0100 | [diff] [blame] | 25 | # TODO(jtattermusch): C++ worker and driver are not buildable on Windows yet |
| 26 | if [ "$OSTYPE" != "msys" ] |
| 27 | then |
| 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 Afshari | ea2b2e2 | 2018-01-25 11:03:09 -0800 | [diff] [blame] | 31 | make CONFIG="${CONFIG}" EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_json_driver -j8 |
Jan Tattermusch | 2de47cb | 2016-11-16 14:11:22 +0100 | [diff] [blame] | 32 | fi |
Jan Tattermusch | 6dd74fc | 2016-04-04 14:16:10 -0700 | [diff] [blame] | 33 | |
ZhouyihaiDing | d015389 | 2017-09-28 15:00:15 -0700 | [diff] [blame] | 34 | PHP_ALREADY_BUILT="" |
Mehrdad Afshari | ea2b2e2 | 2018-01-25 11:03:09 -0800 | [diff] [blame] | 35 | for language in "$@" |
Craig Tiller | 7797e3f | 2016-04-01 07:41:05 -0700 | [diff] [blame] | 36 | do |
Jan Tattermusch | de874a1 | 2016-04-18 09:21:37 -0700 | [diff] [blame] | 37 | 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 Tattermusch | 3b59b0f | 2016-05-10 14:44:05 -0700 | [diff] [blame] | 44 | "go") |
| 45 | tools/run_tests/performance/build_performance_go.sh |
| 46 | ;; |
ZhouyihaiDing | d015389 | 2017-09-28 15:00:15 -0700 | [diff] [blame] | 47 | "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 Tattermusch | d13fbca | 2016-09-09 18:43:34 +0200 | [diff] [blame] | 55 | "csharp") |
Mehrdad Afshari | ea2b2e2 | 2018-01-25 11:03:09 -0800 | [diff] [blame] | 56 | python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8 --compiler coreclr |
Jan Tattermusch | d13fbca | 2016-09-09 18:43:34 +0200 | [diff] [blame] | 57 | ;; |
Jan Tattermusch | de874a1 | 2016-04-18 09:21:37 -0700 | [diff] [blame] | 58 | *) |
Mehrdad Afshari | ea2b2e2 | 2018-01-25 11:03:09 -0800 | [diff] [blame] | 59 | python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8 |
Jan Tattermusch | de874a1 | 2016-04-18 09:21:37 -0700 | [diff] [blame] | 60 | ;; |
| 61 | esac |
Craig Tiller | 7797e3f | 2016-04-01 07:41:05 -0700 | [diff] [blame] | 62 | done |