Skip to content
Merged
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
26 changes: 19 additions & 7 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,36 @@ tasks:
name: Verify build targets (Debian 10)
platform: debian10
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@bazel-diff//:bazel-diff'
verify_targets_ubuntu2004:
name: Verify build targets (Ubuntu 20.04)
platform: ubuntu2004
bazel: ${{ bazel }}
build_targets:
- '@bazel-diff//:bazel-diff'
verify_targets_macos:
name: Verify build targets (macOS)
platform: macos
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@bazel-diff//:bazel-diff'
verify_targets_macos_arm64:
name: Verify build targets (macOS ARM64)
platform: macos_arm64
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@bazel-diff//:bazel-diff'
verify_targets_windows_7x:
name: Verify build targets (Windows, Bazel 7.x)
platform: windows
bazel: "7.x"
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@bazel-diff//:bazel-diff'
verify_targets_windows_8x:
Expand All @@ -40,6 +46,8 @@ tasks:
bazel: "8.x"
build_flags:
- '--legacy_external_runfiles'
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@bazel-diff//:bazel-diff'
verify_targets_windows_9x:
Expand All @@ -48,14 +56,15 @@ tasks:
bazel: "9.x"
build_flags:
- '--legacy_external_runfiles'
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@bazel-diff//:bazel-diff'
bcr_test_module:
module_path: ""
matrix:
platform:
- ubuntu2004
- macos
- macos_arm64
bazel:
- 8.x
Expand All @@ -65,5 +74,8 @@ bcr_test_module:
name: Run test
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
test_targets:
- '//cli/...'
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module(
name = "bazel-diff",
version = "15.0.1",
version = "15.0.2",
compatibility_level = 0,
)

Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions cli/src/test/kotlin/com/bazel_diff/e2e/E2ETest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class E2ETest {
return targets.filter { target ->
// Filter out bazel-diff's own internal test targets
!target.contains("bazel-diff-integration-tests") &&
!target.contains("@@//:BUILD") &&
!target.contains("bazel_diff_maven") // Filter out bazel-diff's maven dependencies
}.toSet()
}
Expand Down Expand Up @@ -695,9 +696,13 @@ class E2ETest {
val gson = Gson()
val shape = object : TypeToken<List<Map<String, Any>>>() {}.type
val actual =
gson.fromJson<List<Map<String, Any>>>(impactedTargetsOutput.readText(), shape).sortedBy {
it["label"] as String
}
gson.fromJson<List<Map<String, Any>>>(impactedTargetsOutput.readText(), shape)
.filter { target ->
// Filter out Bazel convenience symlink targets (bazel-*) as they're not reliably
// present across all environments
!(target["label"] as String).contains("//bazel-")
}
.sortedBy { it["label"] as String }
val expected: List<Map<String, Any>> =
listOf(
mapOf("label" to "//A:one", "targetDistance" to 0.0, "packageDistance" to 0.0),
Expand Down
Binary file not shown.
Binary file modified cli/src/test/resources/fixture/cquery-test-base.zip
Binary file not shown.
Binary file modified cli/src/test/resources/fixture/cquery-test-guava-upgrade.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions cli/src/test/resources/workspaces/distance_metrics/A/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("@rules_shell//shell:sh_library.bzl", "sh_library")

sh_binary(
name = "one",
Expand Down
1 change: 1 addition & 0 deletions cli/src/test/resources/workspaces/distance_metrics/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_shell//shell:sh_library.bzl", "sh_library")

sh_library(
name = "lib",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "distance_metrics_integration",
version = "0.0.0",
)

bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "rules_shell", version = "0.4.0")
193 changes: 193 additions & 0 deletions cli/src/test/resources/workspaces/distance_metrics/MODULE.bazel.lock

Large diffs are not rendered by default.

Loading