Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 0 additions & 221 deletions .bazelci/examples.yml

This file was deleted.

145 changes: 64 additions & 81 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,74 @@
---
# Common platform configurations
.ubuntu2204: &ubuntu2204
platform: ubuntu2204

.macos_arm64: &macos_arm64
platform: macos_arm64

.windows: &windows
platform: windows

# Common environment
.common_env: &common_env
environment:
# This tests custom cache locations.
# https://github.com/bazelbuild/rules_jvm_external/pull/316
COURSIER_CACHE: /tmp/custom_coursier_cache
REPIN: 1

# Common task configurations
.main_test: &main_test
<<: *common_env
bazel: ${{ bazel_version }}
shell_commands:
- bazel run @regression_testing_coursier//:pin
- bazel run @regression_testing_gradle//:pin
- bazel run @regression_testing_maven//:pin
- bazel run @maven_install_in_custom_location//:pin
- bazel run @same_override_target//:pin
- tests/bazel_run_tests.sh
test_targets:
- "--"
- "//..."

.examples_test: &examples_test
test_flags: ${{ shard_flags }}
test_targets:
- "//examples/..."

# Matrix for test expansion
matrix:
bazel_version:
- latest
- 8.x
- 9.x
shard_flags:
- ["--test_tag_filters=shard_0"]
- ["--test_tag_filters=shard_1"]
- ["--test_tag_filters=shard_2"]

tasks:
ubuntu2204:
environment:
# This tests custom cache locations.
# https://github.com/bazelbuild/rules_jvm_external/pull/316
COURSIER_CACHE: /tmp/custom_coursier_cache
REPIN: 1
build_targets:
- "//..."
shell_commands:
- bazel run @regression_testing_coursier//:pin
- bazel run @regression_testing_gradle//:pin
- bazel run @regression_testing_maven//:pin
- bazel run @maven_install_in_custom_location//:pin
- bazel run @same_override_target//:pin
- tests/bazel_run_tests.sh
test_targets:
- "--"
- "//..."
ubuntu2204_7_x:
platform: ubuntu2204
bazel: 7.x
environment:
REPIN: 1
shell_commands:
- bazel run @regression_testing_coursier//:pin
- bazel run @regression_testing_gradle//:pin
- bazel run @regression_testing_maven//:pin
- bazel run @maven_install_in_custom_location//:pin
- bazel run @same_override_target//:pin
- tests/bazel_run_tests.sh
test_targets:
- "--"
- "//..."
ubuntu2204_8_x:
platform: ubuntu2204
bazel: 8.x
environment:
# This tests custom cache locations.
# https://github.com/bazelbuild/rules_jvm_external/pull/316
COURSIER_CACHE: /tmp/custom_coursier_cache
REPIN: 1
shell_commands:
- bazel run @regression_testing_coursier//:pin
- bazel run @regression_testing_gradle//:pin
- bazel run @regression_testing_maven//:pin
- bazel run @maven_install_in_custom_location//:pin
- bazel run @same_override_target//:pin
- tests/bazel_run_tests.sh
test_targets:
- "--"
- "//..."
macos:
environment:
# This tests custom cache locations.
# https://github.com/bazelbuild/rules_jvm_external/pull/316
COURSIER_CACHE: /tmp/custom_coursier_cache
REPIN: 1
shell_commands:
- bazel run @regression_testing_coursier//:pin
- bazel run @regression_testing_gradle//:pin
- bazel run @regression_testing_maven//:pin
- bazel run @maven_install_in_custom_location//:pin
- bazel run @same_override_target//:pin
- tests/bazel_run_tests.sh
test_targets:
- "//..."
# manual tests
windows:
environment:
# This tests custom cache locations.
# https://github.com/bazelbuild/rules_jvm_external/pull/316
COURSIER_CACHE: /tmp/custom_coursier_cache
REPIN: 1
shell_commands:
- bazel run @regression_testing_coursier//:pin
- bazel run @regression_testing_gradle//:pin
- bazel run @regression_testing_maven//:pin
- bazel run @maven_install_in_custom_location//:pin
- bazel run @same_override_target//:pin
- tests/bazel_run_tests.sh
# Main tests (3 platforms × 3 bazel versions = 9 tasks)
ubuntu2204_main:
<<: [*ubuntu2204, *main_test]
macos_arm64_main:
<<: [*macos_arm64, *main_test]
windows_main:
<<: [*windows, *main_test]
test_targets:
- "--"
- "//..."
# rules_kotlin is not tested / does not work on Windows.
# https://github.com/bazelbuild/rules_kotlin/issues/179
# https://github.com/bazelbuild/rules_kotlin/blob/master/.bazelci/presubmit.yml
- "-//tests/unit/kotlin/..."
# https://github.com/bazelbuild/rules_jvm_external/issues/586
- "-//tests/unit/manifest_stamp:diff_signed_manifest_test"

# Example integration tests (3 platforms × 3 shards = 9 tasks)
ubuntu2204_examples:
<<: [*ubuntu2204, *examples_test]
macos_arm64_examples:
<<: [*macos_arm64, *examples_test]
windows_examples:
<<: [*windows, *examples_test]
1 change: 0 additions & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
examples/
scripts/node_modules/
third_party/bazel_json/test
8 changes: 8 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@ build:windows --legacy_external_runfiles

build --sandbox_tmpfs_path=/tmp

common --incompatible_enable_proto_toolchain_resolution
common --@protobuf//bazel/toolchains:prefer_prebuilt_protoc=true

# Exclude example workspaces from main build (they have their own MODULE.bazel)
# Run `bazel run @rules_bazel_integration_test//tools:update_deleted_packages` to update
build --deleted_packages=examples/android_kotlin_app,examples/android_kotlin_app/src,examples/android_local_test,examples/android_local_test/src/main,examples/android_local_test/src/test,examples/bzlmod,examples/bzlmod/java/src/com/github/rules_jvm_external/examples/bzlmod,examples/java-export,examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/export,examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/io,examples/java-export/src/main/proto,examples/kt_android_local_test,examples/kt_android_local_test/src/main,examples/kt_android_local_test/src/test,examples/kt_jvm_export,examples/kt_jvm_export/src/main/kotlin/com/github/bazelbuild/rulesjvmexternal/example/export,examples/pom_file_generation,examples/protobuf-java/src/main,examples/protobuf-java/src/test,examples/scala_akka,examples/simple,examples/spring_boot,examples/spring_boot/src/main/java/hello,examples/spring_boot/src/test/java/hello,tests/integration/bzlmod_lock_files,tests/integration/override_targets/module
query --deleted_packages=examples/android_kotlin_app,examples/android_kotlin_app/src,examples/android_local_test,examples/android_local_test/src/main,examples/android_local_test/src/test,examples/bzlmod,examples/bzlmod/java/src/com/github/rules_jvm_external/examples/bzlmod,examples/java-export,examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/export,examples/java-export/src/main/java/com/github/bazelbuild/rulesjvmexternal/example/io,examples/java-export/src/main/proto,examples/kt_android_local_test,examples/kt_android_local_test/src/main,examples/kt_android_local_test/src/test,examples/kt_jvm_export,examples/kt_jvm_export/src/main/kotlin/com/github/bazelbuild/rulesjvmexternal/example/export,examples/pom_file_generation,examples/protobuf-java/src/main,examples/protobuf-java/src/test,examples/scala_akka,examples/simple,examples/spring_boot,examples/spring_boot/src/main/java/hello,examples/spring_boot/src/test/java/hello,tests/integration/bzlmod_lock_files,tests/integration/override_targets/module

# Allows the examples to extend the default bazelrc
try-import %workspace%/.bazelrc.example
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
9.x
Loading