Skip to content

Commit

Permalink
Add http_archive entries for testing with various JDK versions.
Browse files Browse the repository at this point in the history
RELNOTES: None.
PiperOrigin-RevId: 245023756
  • Loading branch information
philwo authored and copybara-github committed Apr 24, 2019
1 parent ff9db23 commit 75a3a53
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .bazelci/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- "--"
Expand Down
4 changes: 2 additions & 2 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- "--"
Expand Down
53 changes: 41 additions & 12 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 75a3a53

Please sign in to comment.