ADD: added new version of protobuf

This commit is contained in:
Henry Winkel
2022-12-20 10:09:28 +01:00
parent 4a79559129
commit 1e2b3dda7b
1513 changed files with 123720 additions and 83381 deletions

View File

@@ -0,0 +1,47 @@
#!/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
# Print bazel testlogs to stdout when tests failed.
function print_test_logs {
# TODO(yannic): Only print logs of failing tests.
testlogs_dir=$(bazel info bazel-testlogs)
testlogs=$(find "${testlogs_dir}" -name "*.log")
for log in $testlogs; do
cat "${log}"
done
}
# Change to repo root
cd $(dirname $0)/../../..
git submodule update --init --recursive
# Disabled for now, re-enable if appropriate.
# //:build_files_updated_unittest \
trap print_test_logs EXIT
bazel test -k --copt=-Werror --host_copt=-Werror \
//build_defs:all \
//java:tests \
//:protoc \
//:protobuf \
//:protobuf_python \
//:protobuf_test
trap - EXIT
pushd examples
bazel build //...
popd
# Verify that we can build successfully from generated tar files.
./autogen.sh && ./configure && make -j$(nproc) dist
DIST=`ls *.tar.gz`
tar -xf $DIST
cd ${DIST//.tar.gz}
bazel build //:protobuf //:protobuf_java

View File

@@ -1,31 +0,0 @@
# Default setup for the all of our Kokoro builds.
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/bazel.sh"
timeout_mins: 120
env_vars {
key: "CONTAINER_IMAGE"
value: "gcr.io/protobuf-build/bazel/linux-san:b6bfa3bb505e83f062af0cb0ed23abf1e89b9edb"
}
env_vars {
key: "BAZEL_TARGETS"
value: "//src/... @com_google_protobuf_examples//..."
}
env_vars {
key: "BAZEL_CONFIGS"
value: "opt dbg asan kokoro-msan tsan ubsan"
}
env_vars {
key: "BAZEL_EXTRA_FLAGS"
value: "--distinct_host_configuration=false"
}
action {
define_artifacts {
regex: "**/sponge_log.*"
}
}

View File

@@ -1 +1,5 @@
# Keep this file empty! Use common.cfg instead.
# Config file for running tests in Kokoro
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/bazel/build.sh"
timeout_mins: 15

View File

@@ -1 +1,5 @@
# Keep this file empty! Use common.cfg instead.
# Config file for running tests in Kokoro
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/bazel/build.sh"
timeout_mins: 15