Skip to content

Commit

Permalink
Remove duplication in @rules_java presubmit config
Browse files Browse the repository at this point in the history
Brings all configs in sync

PiperOrigin-RevId: 702759908
Change-Id: I30848733e3a279a6622a751d4011f08a05bc01f7
  • Loading branch information
hvadehra authored and rules_java Copybara committed Dec 4, 2024
1 parent 2847c0e commit 084b75a
Showing 1 changed file with 35 additions and 45 deletions.
80 changes: 35 additions & 45 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
build_targets: &build_targets
- "//..."
- "@remote_java_tools//java_tools/..."
# TODO: Look into broken targets in //toolchains
# can't build @remote_java_tools_X repos for other platforms
- "-//toolchains/..."
# TODO: re-enable docs after protobuf is fixed
# TODO: re-enable docs after moving them out of https://bazel.build/reference/be/java
- "-//java/docs/..."
- "-//test:docs_up_to_date_test"

Expand All @@ -13,9 +13,25 @@ build_targets_bazel6: &build_targets_bazel6
- "@remote_java_tools//java_tools/..."
- "//examples/..."

build_targets_integration: &build_targets_integration
- "//..."
- "//:bin_deploy.jar"

test_targets: &test_targets
- "//test/..."
- "//java/test/..."
# TODO: re-enable docs after moving them out of https://bazel.build/reference/be/java
- "-//test:docs_up_to_date_test"

test_targets_bazel6: &test_targets_bazel6
- "//java/test/..."

test_target_integration: &test_target_integration
- "//:MyTest"

flags_workspace_integration: &flags_workspace_integration
- "--noenable_bzlmod"
- "--enable_workspace"

buildifier: latest

Expand All @@ -26,41 +42,27 @@ tasks:
name: "Bazel 7.x"
bazel: "7.4.0"
build_targets: *build_targets
test_targets:
- "//test/..."
- "//java/test/..."
- "-//test:docs_up_to_date_test"
test_targets: *test_targets
ubuntu2004_integration:
name: "Bazel 7.x Integration"
bazel: "7.4.0"
platform: ubuntu2004
working_directory: "test/repo"
shell_commands:
- sh setup.sh
build_targets:
- "//..."
- "//:bin_deploy.jar"
- "@rules_java//java/..."
test_targets:
- "//:MyTest"
build_targets: *build_targets_integration
test_targets: *test_target_integration
ubuntu2004_integration_workspace:
name: "Bazel 7.x Integration (WORKSPACE)"
bazel: "7.4.0"
platform: ubuntu2004
working_directory: "test/repo"
shell_commands:
- sh setup.sh
build_targets:
- "//..."
- "//:bin_deploy.jar"
build_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
test_targets:
- "//:MyTest"
test_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
build_targets: *build_targets_integration
build_flags: *flags_workspace_integration
test_targets: *test_target_integration
test_flags: *flags_workspace_integration
macos:
name: "Bazel 7.x"
bazel: "7.4.0"
Expand All @@ -75,37 +77,27 @@ tasks:
bazel: last_green
platform: ubuntu2004
build_targets: *build_targets
test_targets: *test_targets
ubuntu2004_integration_head:
name: "Bazel@HEAD Integration"
bazel: last_green
platform: ubuntu2004
working_directory: "test/repo"
shell_commands:
- sh setup.sh
build_targets:
- "//..."
- "//:bin_deploy.jar"
- "@rules_java//java/..."
test_targets:
- "//:MyTest"
build_targets: *build_targets_integration
test_targets: *test_target_integration
ubuntu2004_integration_head_workspace:
name: "Bazel@HEAD Integration (WORKSPACE)"
bazel: "last_green"
platform: ubuntu2004
working_directory: "test/repo"
shell_commands:
- sh setup.sh
build_targets:
- "//..."
- "//:bin_deploy.jar"
build_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
test_targets:
- "//:MyTest"
test_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
build_targets: *build_targets_integration
build_flags: *flags_workspace_integration
test_targets: *test_target_integration
test_flags: *flags_workspace_integration
macos_head:
name: "Bazel@HEAD"
bazel: last_green
Expand All @@ -123,18 +115,16 @@ tasks:
bazel: 6.4.0
platform: ubuntu2004
build_targets: *build_targets_bazel6
test_targets: *test_targets_bazel6
ubuntu2004_integration_bazel6:
name: "Bazel 6.x Integration"
bazel: 6.4.0
platform: ubuntu2004
working_directory: "test/repo"
shell_commands:
- sh setup.sh
build_targets:
- "//..."
- "//:bin_deploy.jar"
test_targets:
- "//:MyTest"
build_targets: *build_targets_integration
test_targets: *test_target_integration
macos_bazel6:
name: "Bazel 6.x"
bazel: 6.4.0
Expand Down

0 comments on commit 084b75a

Please sign in to comment.