Skip to content

Commit aa9bb45

Browse files
authored
Explicitly set jdk8 in ci_parameterized_build.sh (tensorflow#22956)
PiperOrigin-RevId: 216946217
1 parent ca1ded0 commit aa9bb45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tensorflow/tools/ci_build/ci_parameterized_build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ BAZEL_TEST_FLAGS=""\
149149
"--test_env=TF_PER_DEVICE_MEMORY_LIMIT_MB=${TF_PER_DEVICE_MEMORY_LIMIT_MB}"
150150
BAZEL_BUILD_FLAGS="--keep_going"
151151

152-
BAZEL_CMD="bazel test ${BAZEL_TEST_FLAGS}"
153-
BAZEL_BUILD_ONLY_CMD="bazel build ${BAZEL_BUILD_FLAGS}"
152+
# Explicitly set jdk8 since that's what's installed in our images. Note that
153+
# bazel 0.16 and higher defaults to jdk9, which causes failures. See b/117634064
154+
BAZEL_JAVA_FLAGS="--java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8"
155+
156+
BAZEL_CMD="bazel test ${BAZEL_TEST_FLAGS} ${BAZEL_JAVA_FLAGS}"
157+
BAZEL_BUILD_ONLY_CMD="bazel build ${BAZEL_BUILD_FLAGS} ${BAZEL_JAVA_FLAGS}"
154158
BAZEL_CLEAN_CMD="bazel clean"
155159

156160
PIP_CMD="${CI_BUILD_DIR}/builds/pip.sh"

0 commit comments

Comments
 (0)