blob: 7d053c109571f16b375358f8a6830b015c166c05 [file] [log] [blame]
#!/bin/bash
#
# Build file to set up and run tests
set -ex
# Install Bazel 4.0.0.
use_bazel.sh 4.0.0
bazel version
# Change to repo root
cd $(dirname $0)/../../..
source kokoro/common/pyenv.sh
git submodule update --init --recursive
# Disabled for now, re-enable if appropriate.
# //:build_files_updated_unittest \
bazel test \
-k --copt=-Werror --host_copt=-Werror --test_output=errors \
//build_defs:all \
//java:tests \
//src/... \
//:protobuf_python \
@com_google_protobuf_examples//...
# Verify that we can build successfully from generated tar files.
(
pyenv versions
pyenv shell 2.7.9 # python2 required for old googletest autotools support
./autogen.sh && ./configure && make -j$(nproc) dist
)
DIST=`ls *.tar.gz`
tar -xf $DIST
cd ${DIST//.tar.gz}
bazel build //:protobuf //:protobuf_java