Skip to content

Commit 9ed9cfb

Browse files
committed
chore: add bazel8 testing on ci
1 parent 387c1e2 commit 9ed9cfb

File tree

10 files changed

+48
-24
lines changed

10 files changed

+48
-24
lines changed

.aspect/bazelrc/correctness.bazelrc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,6 @@ test --incompatible_exclusive_test_sandboxed
4242
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env
4343
build --incompatible_strict_action_env
4444

45-
# Propagate tags from a target declaration to the actions' execution requirements.
46-
# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]`
47-
# get propagated to actions created by the rule.
48-
# Without this option, you rely on rules authors to manually check the tags you passed
49-
# and apply relevant ones to the actions they create.
50-
# See https://github.com/bazelbuild/bazel/issues/8830 for details.
51-
# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
52-
build --experimental_allow_tags_propagation
53-
fetch --experimental_allow_tags_propagation
54-
query --experimental_allow_tags_propagation
55-
5645
# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong
5746
# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python
5847
# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the

.aspect/bazelrc/performance.bazelrc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55
# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
66
build --experimental_reuse_sandbox_directories
77

8-
# Do not build runfiles symlink forests for external repositories under
9-
# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles &
10-
# sandbox creation times & prevents accidentally depending on this feature which may flip to off by
11-
# default in the future. Note, some rules may fail under this flag, please file issues with the rule
12-
# author.
13-
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
14-
build --nolegacy_external_runfiles
15-
168
# Avoid creating a runfiles tree for binaries or tests until it is needed.
179
# Docs: https://bazel.build/reference/command-line-reference#flag--build_runfile_links
1810
# See https://github.com/bazelbuild/bazel/issues/6627

.github/workflows/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ write_aspect_bazelrc_presets(
66
# Modified from upstream
77
# "bazel6",
88
"bazel7",
9+
"bazel8",
910
],
1011
)

.github/workflows/bazel6.bazelrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,24 @@ query --noexperimental_check_output_files
3434
# in Bazel 8.
3535
build --incompatible_remote_results_ignore_disk
3636

37+
# Propagate tags from a target declaration to the actions' execution requirements.
38+
# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]`
39+
# get propagated to actions created by the rule.
40+
# Without this option, you rely on rules authors to manually check the tags you passed
41+
# and apply relevant ones to the actions they create.
42+
# See https://github.com/bazelbuild/bazel/issues/8830 for details.
43+
# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
44+
build --experimental_allow_tags_propagation
45+
fetch --experimental_allow_tags_propagation
46+
query --experimental_allow_tags_propagation
47+
48+
# Do not build runfiles symlink forests for external repositories under
49+
# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles &
50+
# sandbox creation times & prevents accidentally depending on this feature which may flip to off by
51+
# default in the future. Note, some rules may fail under this flag, please file issues with the rule
52+
# author.
53+
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
54+
build --nolegacy_external_runfiles
55+
3756
# Added in 6.4.0, see https://github.com/bazelbuild/bazel/pull/19319
3857
build --incompatible_merge_fixed_and_default_shell_env

.github/workflows/bazel7.bazelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ common --check_direct_dependencies=off
1313
# build.
1414
# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
1515
build --reuse_sandbox_directories
16+
17+
# Do not build runfiles symlink forests for external repositories under
18+
# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles &
19+
# sandbox creation times & prevents accidentally depending on this feature which may flip to off by
20+
# default in the future. Note, some rules may fail under this flag, please file issues with the rule
21+
# author.
22+
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
23+
build --nolegacy_external_runfiles

.github/workflows/bazel8.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# No Bazel 8 specific flag presets yet.

.github/workflows/ci.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
m=${v::1}
3131
a=(
3232
"major:$m, version:\"$v\""
33+
"major:8, version:\"8.2.1\""
3334
"major:6, version:\"6.5.0\""
3435
)
3536
printf -v j '{%s},' "${a[@]}"
@@ -95,6 +96,9 @@ jobs:
9596
- bazel-version:
9697
major: 6
9798
bzlmod: 0
99+
# Don't run tests with Bazel 8 by default
100+
- bazel-version:
101+
major: 8
98102
# Don't test root workspace with non-bzlmod
99103
- bzlmod: 0
100104
folder: .
@@ -121,6 +125,14 @@ jobs:
121125
bzlmod: 1
122126
folder: docs
123127
os: ubuntu
128+
129+
# Include only unit tests with bazel8
130+
- bazel-version:
131+
major: 8
132+
bzlmod: 1
133+
folder: .
134+
os: ubuntu
135+
124136
# Steps represent a sequence of tasks that will be executed as part of the job
125137
steps:
126138
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -187,6 +199,8 @@ jobs:
187199
exclude:
188200
- bazel-version:
189201
major: 6
202+
- bazel-version:
203+
major: 8
190204
steps:
191205
- uses: actions/checkout@v4
192206

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module(
77
)
88

99
# Lower-bounds (minimum) versions for direct runtime dependencies
10-
bazel_dep(name = "aspect_bazel_lib", version = "2.9.3")
10+
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0")
1111
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
1212
bazel_dep(name = "bazel_skylib", version = "1.5.0")
1313
bazel_dep(name = "platforms", version = "0.0.5")

e2e/bzlmod/MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local_path_override(
77
bazel_dep(name = "aspect_rules_js", version = "2.0.0", dev_dependency = True)
88
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
99
bazel_dep(name = "rules_proto", version = "5.3.0-21.7", dev_dependency = True)
10-
bazel_dep(name = "toolchains_protoc", version = "0.2.4", dev_dependency = True)
10+
bazel_dep(name = "toolchains_protoc", version = "0.4.3", dev_dependency = True)
1111

1212
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
1313
npm.npm_translate_lock(

ts/repositories.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def rules_ts_bazel_dependencies():
3030

3131
http_archive(
3232
name = "aspect_bazel_lib",
33-
sha256 = "a272d79bb0ac6b6965aa199b1f84333413452e87f043b53eca7f347a23a478e8",
34-
strip_prefix = "bazel-lib-2.9.3",
35-
url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v2.9.3/bazel-lib-v2.9.3.tar.gz",
33+
sha256 = "40ba9d0f62deac87195723f0f891a9803a7b720d7b89206981ca5570ef9df15b",
34+
strip_prefix = "bazel-lib-2.14.0",
35+
url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v2.14.0/bazel-lib-v2.14.0.tar.gz",
3636
)
3737

3838
http_archive(

0 commit comments

Comments
 (0)