Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a996fce
simplify the initial port/uniification
aignas Nov 24, 2025
732c425
update rules_go, gazelle and java
aignas Nov 24, 2025
e89a50b
fix the bazelrc
aignas Nov 24, 2025
1e4f22a
update C++
aignas Nov 24, 2025
b39a19b
better job naming
aignas Nov 24, 2025
17a8e55
attempt bazel version in the job title
aignas Nov 24, 2025
4f44c17
Revert "attempt bazel version in the job title"
aignas Nov 24, 2025
b91a618
Only use bazel 7 and 8
aignas Nov 25, 2025
cd86638
revert rules_python to rules_go 41, gazelle 40
rickeylev Nov 25, 2025
b2be8f3
Merge branch 'main' into aignas.chore.bump-for-bazel-9
aignas Nov 26, 2025
972a424
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev Dec 3, 2025
368ced6
Merge branch 'aignas.chore.bump-for-bazel-9' of https://github.com/ai…
rickeylev Dec 3, 2025
5c1330f
set c++17 for build command step
rickeylev Dec 3, 2025
a41d806
use /std for windows
rickeylev Dec 3, 2025
05b8dfe
fix windows flag syntx
rickeylev Dec 3, 2025
759d304
try to fix syntax error in win command
rickeylev Dec 3, 2025
71cdb8b
add leading space to fix syntx error
rickeylev Dec 3, 2025
7403e0b
try to put bazel version in job name
rickeylev Dec 3, 2025
eb5b9e2
revert putting bzel verison in job name
rickeylev Dec 3, 2025
0a98669
try regular format syntax for name
rickeylev Dec 4, 2025
159995b
refine task name
rickeylev Dec 4, 2025
ff6ea32
no gazelle windows
rickeylev Dec 4, 2025
c2d7cb0
fix yaml syntax
rickeylev Dec 4, 2025
a1db98d
add comments, remove windows from bcr presubmit
rickeylev Dec 4, 2025
7a454f0
update changlog
rickeylev Dec 4, 2025
0a11a22
note windows gazelle is broken
rickeylev Dec 4, 2025
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
147 changes: 46 additions & 101 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,50 @@ buildifier:
- //tests:version_3_13_test
- //tests:version_3_14_test
- //tests:version_default_test

matrix:
platform:
- ubuntu2204

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add Ubuntu 2404 too? Or is it not available in our ci?

- debian11

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add debian 12? 13 is already out also.

- macos_arm64
- windows
bazel: [7.*, 8.*, 9.*]
Comment thread
aignas marked this conversation as resolved.
Outdated

tasks:
bcr_test:
name: BCR example - rules_python
platform: ${{ platform }}
working_directory: examples/bzlmod
bazel: ${{ bazel }}
test_flags:
# Minimum bazel supported C++
- "--keep_going"
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- "//..."
test_targets:
- "//..."

bcr_gazelle_test:
name: BCR example - rules_python_gazelle_plugin
platform: ${{ platform }}
bazel: ${{ bazel }}
working_directory: gazelle/examples/bzlmod_build_file_generation
shell_commands:
- "echo 'common --override_module=rules_python=' >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
batch_commands:
- "echo common --override_module=rules_python= >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
build_targets:
- "//..."
- ":modules_map"
test_targets:
- "//..."

gazelle_extension_min:
<<: *common_workspace_flags_min_bazel
<<: *minimum_supported_version
Expand Down Expand Up @@ -262,113 +305,15 @@ tasks:
working_directory: examples/build_file_generation
platform: windows

integration_test_bzlmod_ubuntu_min:
<<: *minimum_supported_version
<<: *reusable_build_test_all
coverage_targets: ["//:test"]
name: "examples/bzlmod: Ubuntu, minimum Bazel"
working_directory: examples/bzlmod
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_ubuntu:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: Ubuntu"
working_directory: examples/bzlmod
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_ubuntu_upcoming:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: Ubuntu, upcoming Bazel"
working_directory: examples/bzlmod
platform: ubuntu2204
bazel: last_rc
integration_test_bzlmod_debian:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: Debian"
working_directory: examples/bzlmod
platform: debian11
bazel: 7.x
integration_test_bzlmod_ubuntu_vendor:
<<: *reusable_build_test_all
name: "examples/bzlmod: bazel vendor"
working_directory: examples/bzlmod
platform: ubuntu2204
shell_commands:
- "bazel vendor --vendor_dir=./vendor //..."
- "bazel build --vendor_dir=./vendor //..."
- "rm -rf ./vendor"
integration_test_bzlmod_macos:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: macOS"
working_directory: examples/bzlmod
platform: macos_arm64
bazel: 7.x
integration_test_bzlmod_macos_upcoming:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: macOS, upcoming Bazel"
working_directory: examples/bzlmod
platform: macos_arm64
bazel: last_rc
integration_test_bzlmod_windows:
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "examples/bzlmod: Windows"
working_directory: examples/bzlmod
platform: windows
bazel: 7.x
integration_test_bzlmod_windows_upcoming:
Comment thread
aignas marked this conversation as resolved.
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "examples/bzlmod: Windows, upcoming Bazel"
working_directory: examples/bzlmod
platform: windows
bazel: last_rc

integration_test_bzlmod_generate_build_file_generation_ubuntu_min:
<<: *minimum_supported_version
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, minimum Bazel"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_generation_build_files_ubuntu:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
integration_test_bzlmod_generation_build_files_ubuntu_run:
<<: *reusable_build_test_all
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, Gazelle and pip"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
shell_commands:
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
integration_test_bzlmod_build_file_generation_debian:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Debian"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: debian11
integration_test_bzlmod_build_file_generation_macos:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: MacOS"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: macos_arm64
integration_test_bzlmod_build_file_generation_windows:
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "gazelle/examples/bzlmod_build_file_generation: Windows"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: windows
- "bazel vendor --vendor_dir=./vendor //..."
- "bazel build --vendor_dir=./vendor //..."
- "rm -rf ./vendor"

integration_test_multi_python_versions_ubuntu_workspace:
<<: *reusable_build_test_all
Expand Down
8 changes: 6 additions & 2 deletions .bcr/gazelle/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@
bcr_test_module:
module_path: "examples/bzlmod_build_file_generation"
matrix:
platform: ["debian11", "macos", "ubuntu2004", "windows"]
bazel: [7.x, 8.x]
platform: ["debian11", "macos", "ubuntu2204", "windows"]
bazel: [7.x, 8.x, 9.x]
Comment thread
aignas marked this conversation as resolved.
Outdated
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
shell_commands:
- "echo 'common --override_module=rules_python=' >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
batch_commands:
- "echo common --override_module=rules_python= >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
build_targets:
- "//..."
- ":modules_map"
Expand Down
12 changes: 7 additions & 5 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
bcr_test_module:
module_path: "examples/bzlmod"
matrix:
platform: ["debian11", "macos", "ubuntu2004", "windows"]
bazel: [7.x, 8.x]
platform: ["debian11", "macos", "ubuntu2204", "windows"]
bazel: [7.x, 8.x, 9.x]
Comment thread
aignas marked this conversation as resolved.
Outdated
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_flags:
# Minimum bazel supported C++
- "--keep_going"
# Without these cxxopts, BCR's Mac builds fail
- '--cxxopt=-std=c++14'
- '--host_cxxopt=-std=c++14'
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- "//..."
test_targets:
- "//..."
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ bazel_dep(name = "another_module", version = "0", dev_dependency = True)

# Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests.
# We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides.
bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_go", version = "0.59.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "gazelle", version = "0.47.0", dev_dependency = True, repo_name = "bazel_gazelle")

internal_dev_deps = use_extension(
"//python/private:internal_dev_deps.bzl",
Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bazel_dep(name = "protobuf", version = "27.0", repo_name = "com_google_protobuf"

# Only needed to make rules_python's CI happy. rules_java 8.3.0+ is needed so
# that --java_runtime_version=remotejdk_11 works with Bazel 8.
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")

# Only needed to make rules_python's CI happy. A test verifies that
# MODULE.bazel.lock is cross-platform friendly, and there are transitive
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_python_versions/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True)

# Only needed to make rules_python's CI happy. rules_java 8.3.0+ is needed so
# that --java_runtime_version=remotejdk_11 works with Bazel 8.
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")
4 changes: 2 additions & 2 deletions gazelle/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module(

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "rules_python", version = "0.18.0")
bazel_dep(name = "rules_go", version = "0.55.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_cc", version = "0.0.16")

local_path_override(
Expand Down
2 changes: 1 addition & 1 deletion gazelle/examples/bzlmod_build_file_generation/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test --test_output=errors --enable_runfiles
# Windows requires these for multi-python support:
build --enable_runfiles

common --experimental_enable_bzlmod
common --enable_bzlmod

coverage --java_runtime_version=remotejdk_11
common:bazel7.x --incompatible_python_disallow_native_rules
Expand Down
4 changes: 2 additions & 2 deletions gazelle/examples/bzlmod_build_file_generation/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local_path_override(
# The following stanza defines the dependency for gazelle
# See here https://github.com/bazelbuild/bazel-gazelle/releases/ for the
# latest version.
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")

# The following stanze returns a proxy object representing a module extension;
# its methods can be invoked to create module extension tags.
Expand Down Expand Up @@ -84,4 +84,4 @@ local_path_override(
)

# Only needed to make rules_python's CI happy
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")