• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2017 gRPC authors.
3#
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
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15
16# Build portability tests with an updated submodule
17
18set -ex
19
20# change to grpc repo root
21cd $(dirname $0)/../../..
22
23source tools/internal_ci/helper_scripts/prepare_build_linux_rc
24
25# Update submodule to be tested at HEAD
26(cd third_party/$RUN_TESTS_FLAGS && git fetch --all && git checkout origin/master)
27tools/buildgen/generate_projects.sh
28
29if [ "$RUN_TESTS_FLAGS" == "protobuf" ]
30then
31  # Upgrade bazel.
32  # make_grpcio_tools.py requires bazel >=0.13.1 to run (Kokoro workers only have bazel 0.9)
33  curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/0.13.1/bazel-0.13.1-installer-linux-x86_64.sh
34  chmod +x ./bazel-0.13.1-installer-linux-x86_64.sh
35  ./bazel-0.13.1-installer-linux-x86_64.sh --user
36  rm -f ./bazel-0.13.1-installer-linux-x86_64.sh
37  export PATH="$PATH:$HOME/bin"
38
39  tools/distrib/python/make_grpcio_tools.py
40fi
41
42# commit so that changes are passed to Docker
43git -c user.name='foo' -c user.email='foo@google.com' commit -a -m 'Update submodule'
44
45tools/run_tests/run_tests_matrix.py -f linux --inner_jobs 4 -j 4 --internal_ci --build_only
46