diff --git a/.bazelci/postsubmit.yml b/.bazelci/postsubmit.yml index 5f4963a9a1fdd2..c3649dfc482719 100644 --- a/.bazelci/postsubmit.yml +++ b/.bazelci/postsubmit.yml @@ -71,12 +71,12 @@ platforms: - "-//src/test/shell/bazel:jdeps_test" ubuntu1804_nojava: build_flags: - - "--javabase=@openjdk_linux_archive//:runtime" + - "--javabase=@openjdk11_linux_archive//:runtime" build_targets: - "//src:bazel" - "//src:bazel_jdk_minimal" test_flags: - - "--javabase=@openjdk_linux_archive//:runtime" + - "--javabase=@openjdk11_linux_archive//:runtime" - "--test_timeout=1200" test_targets: - "--" diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index eefe4a87dd8688..0019ab312920f9 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -83,12 +83,12 @@ platforms: - "-//src/test/shell/bazel:jdeps_test" ubuntu1804_nojava: build_flags: - - "--javabase=@openjdk_linux_archive//:runtime" + - "--javabase=@openjdk11_linux_archive//:runtime" build_targets: - "//src:bazel" - "//src:bazel_jdk_minimal" test_flags: - - "--javabase=@openjdk_linux_archive//:runtime" + - "--javabase=@openjdk11_linux_archive//:runtime" - "--test_timeout=1200" test_targets: - "--" diff --git a/WORKSPACE b/WORKSPACE index b3cbfdf4aca028..1b33232c2d0cf0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -198,18 +198,6 @@ http_file( ], ) -# Used by CI to test Bazel on platforms without an installed system JDK. -# TODO(twerth): Migrate to @remotejdk when https://github.com/bazelbuild/bazel/pull/6216 is merged. -http_archive( - name = "openjdk_linux_archive", - build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", - sha256 = "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87", - strip_prefix = "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules", - urls = [ - "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz", - ], -) - http_file( name = "openjdk_macos", downloaded_file_path = "zulu-macos.tar.gz", @@ -264,6 +252,47 @@ http_file( ], ) +# OpenJDK versions only used by CI to test Bazel with various JDKs. +http_archive( + name = "openjdk12_linux_archive", + build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + sha256 = "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13", + strip_prefix = "zulu12.2.3-ca-jdk12.0.1-linux_x64", + urls = [ + "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz", + ], +) + +http_archive( + name = "openjdk11_linux_archive", + build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + sha256 = "ddb0fd4526089cf1ce2db36282c282263f587a9e8be373fa02f511a12923cc48", + strip_prefix = "zulu11.31.11-ca-jdk11.0.3-linux_x64", + urls = [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.11-ca-jdk11.0.3/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz", + ], +) + +http_archive( + name = "openjdk10_linux_archive", + build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + sha256 = "b3c2d762091a615b0c1424ebbd05d75cc114da3bf4f25a0dec5c51ea7e84146f", + strip_prefix = "zulu10.2+3-jdk10.0.1-linux_x64", + urls = [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-linux_x64.tar.gz", + ], +) + +http_archive( + name = "openjdk9_linux_archive", + build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + sha256 = "45f2dfbee93b91b1468cf81d843fc6d9a47fef1f831c0b7ceff4f1eb6e6851c8", + strip_prefix = "zulu9.0.7.1-jdk9.0.7-linux_x64", + urls = [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz", + ], +) + # The source-code for this OpenJDK can be found at: # https://openjdk.linaro.org/releases/jdk9-src-1708.tar.xz http_file(