Skip to content

Commit c1d78ec

Browse files
authored
chore: enable aspect workflows for more Bazel versions (#832)
* chore: enable aspect workflows for more Bazel versions * fix icon * add bazel 6 * note: needs bazel-contrib/bazelrc-preset.bzl#64 * chore: upgrade bazelrc-preset * chore: preset isn't applied * turn one off
1 parent 595a20e commit c1d78ec

File tree

3 files changed

+55
-8
lines changed

3 files changed

+55
-8
lines changed

.aspect/workflows/config.yaml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# See https://docs.aspect.build/workflows/configuration
22
workspaces:
33
.:
4-
icon: ts
4+
icon: typescript
55
label: rules_ts
6-
tasks:
7-
- test:
86
e2e/smoke:
97
tasks:
10-
- test:
8+
- bazel-6:
9+
without: true
10+
- bazel-7:
11+
queue: aspect-medium
12+
- bazel-8:
1113
queue: aspect-medium
1214
- format:
1315
without: true
@@ -17,7 +19,11 @@ workspaces:
1719
without: true
1820
e2e/external_dep:
1921
tasks:
20-
- test:
22+
- bazel-6:
23+
queue: aspect-medium
24+
- bazel-7:
25+
queue: aspect-medium
26+
- bazel-8:
2127
queue: aspect-medium
2228
- format:
2329
without: true
@@ -27,7 +33,11 @@ workspaces:
2733
without: true
2834
e2e/worker:
2935
tasks:
30-
- test:
36+
- bazel-6:
37+
queue: aspect-medium
38+
- bazel-7:
39+
queue: aspect-medium
40+
- bazel-8:
3141
queue: aspect-medium
3242
- format:
3343
without: true
@@ -37,7 +47,11 @@ workspaces:
3747
without: true
3848
e2e/test:
3949
tasks:
40-
- test:
50+
- bazel-6:
51+
queue: aspect-medium
52+
- bazel-7:
53+
queue: aspect-medium
54+
- bazel-8:
4155
queue: aspect-medium
4256
- format:
4357
without: true
@@ -47,6 +61,23 @@ workspaces:
4761
without: true
4862
tasks:
4963
- test:
64+
name: 'Test (Bazel 6.x)'
65+
id: bazel-6
66+
bazel:
67+
flags:
68+
- --incompatible_merge_fixed_and_default_shell_env
69+
env:
70+
USE_BAZEL_VERSION: 6.x
71+
- test:
72+
name: 'Test (Bazel 7.x)'
73+
id: bazel-7
74+
env:
75+
USE_BAZEL_VERSION: 7.x
76+
- test:
77+
name: 'Test (Bazel 8.x)'
78+
id: bazel-8
79+
env:
80+
USE_BAZEL_VERSION: 8.x
5081
- format:
5182
queue: aspect-medium
5283
use_args_file: false

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bazel_dep(name = "rules_proto", version = "6.0.0")
2222
####### Dev dependencies ########
2323

2424
bazel_dep(name = "aspect_rules_lint", version = "1.2.1", dev_dependency = True)
25-
bazel_dep(name = "bazelrc-preset.bzl", version = "1.0.1", dev_dependency = True)
25+
bazel_dep(name = "bazelrc-preset.bzl", version = "1.1.0", dev_dependency = True)
2626
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
2727
bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
2828
bazel_dep(name = "rules_nodejs", version = "6.2.0", dev_dependency = True)

tools/preset.bazelrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ coverage --build_runfile_links
2424
common:debug --nocache_test_results
2525
# Docs: https://registry.build/flag/[email protected]?filter=cache_test_results
2626

27+
# Don’t encourage a rules author to update their deps if not needed.
28+
# These bazel_dep calls should indicate the minimum version constraint of the ruleset.
29+
# If the author instead updates to the newest of any of their transitives, as this flag would suggest,
30+
# then they'll also force their dependents to a newer version.
31+
# Context:
32+
# https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0
33+
common:ruleset --check_direct_dependencies="off"
34+
# Docs: https://registry.build/flag/[email protected]?filter=check_direct_dependencies
35+
2736
# On CI, use colors to highlight output on the screen. Set to `no` if your CI does not display colors.
2837
common:ci --color="yes"
2938
# Docs: https://registry.build/flag/[email protected]?filter=color
@@ -148,6 +157,13 @@ common:ci --remote_local_fallback
148157
common:ci --remote_timeout=3600
149158
# Docs: https://registry.build/flag/[email protected]?filter=remote_timeout
150159

160+
# Do not upload locally executed action results to the remote cache.
161+
# This should be the default for local builds so local builds cannot poison the remote cache.
162+
#
163+
# Note that this flag is flipped to True under --config=ci, see below.
164+
common --noremote_upload_local_results
165+
# Docs: https://registry.build/flag/[email protected]?filter=remote_upload_local_results
166+
151167
# On CI, upload locally executed action results to the remote cache.
152168
common:ci --remote_upload_local_results
153169
# Docs: https://registry.build/flag/[email protected]?filter=remote_upload_local_results

0 commit comments

Comments
 (0)