| --- | |
| build_targets: &build_targets | |
| - "//..." | |
| # can't build some analysis tests on older Bazel versions | |
| - "-//test/java/..." | |
| # build java_tools from source | |
| - "@remote_java_tools//:ijar_cc_binary" | |
| - "@remote_java_tools//:one_version_cc_bin" | |
| - "@remote_java_tools//:proguard" | |
| - "@remote_java_tools//:singlejar_cc_bin" | |
| # can't build @remote_java_tools_X repos for other platforms | |
| - "-//toolchains/..." | |
| # TODO: re-enable docs after moving them out of https://bazel.build/reference/be/java | |
| - "-//java/docs/..." | |
| - "-//test:docs_up_to_date_test" | |
| build_targets_bazel6: &build_targets_bazel6 | |
| - "//:all" | |
| # build java_tools from source | |
| - "@remote_java_tools//:ijar_cc_binary" | |
| - "@remote_java_tools//:one_version_cc_bin" | |
| - "@remote_java_tools//:proguard" | |
| - "@remote_java_tools//:singlejar_cc_bin" | |
| - "//examples/..." | |
| build_targets_integration: &build_targets_integration | |
| - "//..." | |
| - "//:bin_deploy.jar" | |
| test_targets: &test_targets | |
| - "//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 | |
| - "//test/java/..." | |
| - "-//test/java/private/..." | |
| test_target_integration: &test_target_integration | |
| - "//:MyTest" | |
| flags_workspace_integration: &flags_workspace_integration | |
| - "--noenable_bzlmod" | |
| - "--enable_workspace" | |
| buildifier: latest | |
| matrix: | |
| all_platforms: ["ubuntu2004", "macos", "macos_arm64", "windows"] | |
| bazel: ["7.6.1", "8.3.0", "last_green"] # Bazel 6 tested separately, needs different flags | |
| modern_bazel: ["last_green"] # Fully supported Bazel versions | |
| tasks: | |
| # Bazel 9+ | |
| build_and_test: | |
| name: "Bazel {modern_bazel}" | |
| bazel: ${{ modern_bazel }} | |
| platform: ${{ all_platforms }} | |
| build_targets: *build_targets | |
| test_targets: *test_targets | |
| # Bazel 8.x | |
| build_and_test_bazel8: | |
| name: "Bazel 8.3.0" | |
| bazel: "8.3.0" | |
| platform: ${{ all_platforms }} | |
| build_targets: *build_targets | |
| test_targets: *test_targets | |
| test_flags: | |
| - "--test_tag_filters=-min_bazel_9" | |
| # Bazel 7.x | |
| build_and_test_bazel7: | |
| name: "Bazel 7.6.1" | |
| bazel: "7.6.1" | |
| platform: ${{ all_platforms }} | |
| build_targets: *build_targets | |
| test_targets: *test_targets | |
| test_flags: | |
| - "--test_tag_filters=-min_bazel_8,-min_bazel_9" | |
| # Bazel 6.x | |
| build_and_test_bazel6: | |
| name: "Bazel 6.5.0" | |
| bazel: 6.5.0 | |
| platform: ${{ all_platforms }} | |
| build_targets: *build_targets_bazel6 | |
| test_targets: *test_targets_bazel6 | |
| test_flags: | |
| - "--test_tag_filters=-min_bazel_7,-min_bazel_8,-min_bazel_9" | |
| ubuntu2004_integration_bazel6: | |
| name: "Integration w/ Bazel 6.5.0" | |
| bazel: 6.5.0 | |
| platform: ${{ all_platforms }} | |
| working_directory: "test/repo" | |
| shell_commands: | |
| - sh setup.sh | |
| batch_commands: | |
| - setup.bat | |
| build_targets: *build_targets_integration | |
| test_targets: *test_target_integration | |
| # Integration tests | |
| integration_build_and_test: | |
| name: "Integration w/ Bazel {bazel}" | |
| bazel: ${{ bazel }} | |
| platform: ${{ all_platforms }} | |
| working_directory: "test/repo" | |
| shell_commands: | |
| - sh setup.sh | |
| batch_commands: | |
| - setup.bat | |
| build_targets: *build_targets_integration | |
| test_targets: *test_target_integration | |
| integration_build_and_test_workspace: | |
| name: "Integration (WORKSPACE) w/ Bazel {bazel}" | |
| bazel: ${{ bazel }} | |
| platform: ${{ all_platforms }} | |
| working_directory: "test/repo" | |
| shell_commands: | |
| - sh setup.sh | |
| batch_commands: | |
| - setup.bat | |
| build_targets: *build_targets_integration | |
| build_flags: *flags_workspace_integration | |
| test_targets: *test_target_integration | |
| test_flags: *flags_workspace_integration | |
| # Linux-only tests | |
| linux_only_tests: | |
| name: "Extra tests w/ Bazel {bazel}" | |
| bazel: ${{ bazel }} | |
| platform: "ubuntu2004" | |
| shell_commands: | |
| - "git init" | |
| - "git config user.name 'fake-user-for-testing'" | |
| - "git commit --allow-empty -m 'Fake init commit'" | |
| - "git tag -a 'fake-tag-for-testing' -m 'ignore'" | |
| - "git commit --allow-empty -m 'Fake commit message for testing'" | |
| test_targets: | |
| - "//test:check_remote_jdk_configs_test" | |
| - "//test:check_release_notes_test" |