Fix broken examples build (#10614)

* Add .bazelrc for examples repo

* Include examples in some of our basic tests
pull/10620/head
Mike Kruskal 2 years ago committed by GitHub
parent fe9db54ced
commit e18aa2eda7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      examples/.bazelrc
  2. 2
      kokoro/linux/bazel/common.cfg
  3. 2
      kokoro/linux/cmake/build.sh
  4. 2
      kokoro/windows/bazel/build.bat
  5. 1
      kokoro/windows/cmake/build.bat

@ -0,0 +1 @@
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14

@ -6,7 +6,7 @@ timeout_mins: 15
env_vars {
key: "BAZEL_TARGETS"
value: "//src/..."
value: "//src/... @com_google_protobuf_examples//..."
}
action {

@ -19,7 +19,7 @@ docker run \
--cidfile $tmpfile \
-v $GIT_REPO_ROOT:/workspace \
$CONTAINER_IMAGE \
/test.sh -Dprotobuf_BUILD_CONFORMANCE=ON
/test.sh -Dprotobuf_BUILD_CONFORMANCE=ON -Dprotobuf_BUILD_EXAMPLES=ON
# Save logs for Kokoro
docker cp \

@ -24,7 +24,7 @@ bazel %BAZEL_STARTUP% build //:protoc //:protobuf //:protobuf_lite %BAZEL_FLAGS%
@rem TODO(b/241484899) Enable conformance tests on windows.
bazel %BAZEL_STARTUP% test %BAZEL_FLAGS% ^
--test_tag_filters=-conformance --build_tag_filters=-conformance ^
//src/... || goto :error
//src/... @com_google_protobuf_examples//... || goto :error
goto :EOF

@ -13,6 +13,7 @@ cd build
cmake .. ^
-G "Visual Studio 15 2017" -A x64 ^
-Dprotobuf_BUILD_EXAMPLES=ON ^
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
-Dprotobuf_WITH_ZLIB=OFF ^
-Dprotobuf_TEST_XML_OUTDIR=%KOKORO_ARTIFACTS_DIR%\logs\ || goto :error

Loading…
Cancel
Save