11---
22minimum_bazel_version : &minimum_bazel_version "7.4.1"
3+ minimum_bazel_shell_commands : &minimum_bazel_shell_commands
4+ - echo "build --build_runfile_links" >> user.bazelrc
35no_bzlmod_bazel_version : &no_bzlmod_bazel_version "7.4.1"
46no_bzlmod_shell_commands : &no_bzlmod_shell_commands
57 - echo "common --noenable_bzlmod --enable_workspace" >> user.bazelrc
8+ - echo "build --build_runfile_links" >> user.bazelrc
69 - echo "7.4.1" > .bazelversion
710no_bzlmod_rbe_shell_commands : &no_bzlmod_rbe_shell_commands
811 - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel
912 - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
1013 - echo "common --noenable_bzlmod --enable_workspace" >> user.bazelrc
14+ - echo "build --build_runfile_links" >> user.bazelrc
1115 - echo "7.4.1" > .bazelversion
1216aspects_flags : &aspects_flags
1317 - " --config=rustfmt"
1418 - " --config=clippy"
1519min_rust_version_shell_commands : &min_rust_version_shell_commands
16- - sed -i 's|^rust_register_toolchains(|rust_register_toolchains(versions = ["1.72.1"],\n|' WORKSPACE.bazel
20+ - sed -i 's|^rust_register_toolchains(|rust_register_toolchains(versions = ["1.74.0"],\n|' WORKSPACE.bazel
21+ - sed -i 's|^rust\.toolchain(|rust.toolchain(versions = ["1.74.0"],\n|' MODULE.bazel
1722nightly_flags : &nightly_flags
1823 - " --//rust/toolchain/channel=nightly"
1924nightly_aspects_flags : &nightly_aspects_flags
@@ -52,33 +57,23 @@ single_rust_channel_min_version_targets: &single_rust_channel_min_version_target
5257default_linux_targets : &default_linux_targets
5358 - " --"
5459 - " //..."
60+ default_rbe_targets : &default_rbe_targets
61+ - " --"
62+ - " //..."
63+ # These require the upstream tools wrapper to include a stdlib, which doesn't currently work on RBE.
64+ # We should fix this. See https://github.com/bazelbuild/rules_rust/issues/3252
65+ - " -//cargo/cargo_toml_variable_extractor/testdata/..."
5566default_macos_targets : &default_macos_targets
5667 - " --"
5768 - " //..."
5869default_windows_targets : &default_windows_targets
5970 - " --" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
6071 - " //..."
61- - " -//test/unit/pipelined_compilation/..."
62- default_windows_no_runfiles_targets : &default_windows_no_runfiles_targets
63- - " --" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
64- - " //..."
65- # TODO: https://github.com/bazelbuild/rules_rust/issues/1156
66- - " -//crate_universe/..."
67- - " -//test/chained_direct_deps:mod3_doc_test"
68- - " -//test/out_dir_in_tests:demo_lib_doc_test"
69- - " -//test/rustc_env_files:output_test"
70- - " -//test/test_env_launcher:test"
71- - " -//test/test_env:test_manifest_dir"
72- - " -//test/test_env:test_run"
73- - " -//test/unit/pipelined_compilation/..."
74- - " -//test/unit/rustdoc/..."
75- - " -//rust/runfiles/..."
76- # Runfiles used by the test only.
77- - " -//test/empty_suite:deps_test"
7872crate_universe_vendor_example_targets : &crate_universe_vendor_example_targets
7973 - " //vendor_external:crates_vendor"
8074 - " //vendor_local_manifests:crates_vendor"
8175 - " //vendor_local_pkgs:crates_vendor"
76+ - " //vendor_local_patching:crates_vendor"
8277 - " //vendor_remote_manifests:crates_vendor"
8378 - " //vendor_remote_pkgs:crates_vendor"
8479 - " @rules_rust//tools/rust_analyzer:gen_rust_project"
@@ -105,8 +100,8 @@ tasks:
105100 shell_commands :
106101 - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel
107102 - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
108- build_targets : *default_linux_targets
109- test_targets : *default_linux_targets
103+ build_targets : *default_rbe_targets
104+ test_targets : *default_rbe_targets
110105 macos :
111106 platform : macos_arm64
112107 build_targets : *default_macos_targets
@@ -132,8 +127,8 @@ tasks:
132127 platform : rbe_ubuntu2004
133128 bazel : *no_bzlmod_bazel_version
134129 shell_commands : *no_bzlmod_rbe_shell_commands
135- build_targets : *default_linux_targets
136- test_targets : *default_linux_targets
130+ build_targets : *default_rbe_targets
131+ test_targets : *default_rbe_targets
137132 macos_no_bzlmod :
138133 name : No Bzlmod
139134 platform : macos_arm64
@@ -150,15 +145,14 @@ tasks:
150145 shell_commands : *no_bzlmod_shell_commands
151146 build_targets : *default_windows_targets
152147 test_targets : *default_windows_targets
153- windows_no_runfiles :
154- name : No Runfiles
148+ windows_with_runfiles :
149+ name : With Runfiles
155150 platform : windows
156- build_flags :
157- - " --noenable_runfiles"
158- test_flags :
159- - " --noenable_runfiles"
160- build_targets : *default_windows_no_runfiles_targets
161- test_targets : *default_windows_no_runfiles_targets
151+ batch_commands :
152+ - echo startup --windows_enable_symlinks > user.bazelrc
153+ - echo common --noenable_runfiles >> user.bazelrc
154+ build_targets : *default_windows_targets
155+ test_targets : *default_windows_targets
162156 ubuntu2004_split_coverage_postprocessing :
163157 name : Split Coverage Postprocessing
164158 platform : ubuntu2004
@@ -213,16 +207,16 @@ tasks:
213207 - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel
214208 - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
215209 build_flags : *aspects_flags
216- build_targets : *default_linux_targets
217- test_targets : *default_linux_targets
210+ build_targets : *default_rbe_targets
211+ test_targets : *default_rbe_targets
218212 rbe_ubuntu2004_rolling_with_aspects :
219213 name : RBE Rolling Bazel Version With Aspects
220214 platform : rbe_ubuntu2004
221215 shell_commands :
222216 - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel
223217 - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
224- build_targets : *default_linux_targets
225- test_targets : *default_linux_targets
218+ build_targets : *default_rbe_targets
219+ test_targets : *default_rbe_targets
226220 build_flags : *aspects_flags
227221 soft_fail : yes
228222 bazel : " rolling"
@@ -253,18 +247,19 @@ tasks:
253247 build_targets : *default_windows_targets
254248 test_targets : *default_windows_targets
255249 windows_no_runfiles_with_aspects :
256- name : No Runfiles With Aspects
250+ name : With Runfiles With Aspects
257251 platform : windows
252+ batch_commands :
253+ - echo startup --windows_enable_symlinks > user.bazelrc
254+ - echo common --noenable_runfiles >> user.bazelrc
258255 build_flags :
259- - " --noenable_runfiles"
260256 - " --config=rustfmt"
261257 - " --config=clippy"
262258 test_flags :
263- - " --noenable_runfiles"
264259 - " --config=rustfmt"
265260 - " --config=clippy"
266- build_targets : *default_windows_no_runfiles_targets
267- test_targets : *default_windows_no_runfiles_targets
261+ build_targets : *default_windows_targets
262+ test_targets : *default_windows_targets
268263 windows_rolling_with_aspects :
269264 name : " Windows Rolling Bazel Version With Aspects"
270265 platform : windows
@@ -332,6 +327,7 @@ tasks:
332327 # If updating the minimum bazel version, please also update /docs/index.md
333328 bazel : *minimum_bazel_version
334329 platform : ubuntu1804
330+ shell_commands : *minimum_bazel_shell_commands
335331 build_targets : *default_linux_targets
336332 test_targets : *default_linux_targets
337333 coverage_targets : *default_linux_targets
@@ -340,6 +336,7 @@ tasks:
340336 name : " Min Bazel Version With Aspects"
341337 bazel : *minimum_bazel_version
342338 platform : ubuntu1804
339+ shell_commands : *minimum_bazel_shell_commands
343340 build_targets : *default_linux_targets
344341 test_targets : *default_linux_targets
345342 build_flags : *aspects_flags
@@ -365,6 +362,7 @@ tasks:
365362 # Test rules while only registering a nightly toolchain
366363 shell_commands :
367364 - sed -i 's|^rust_register_toolchains(|load("//rust/private:common.bzl", "DEFAULT_RUST_VERSION")\nrust_register_toolchains(versions = [DEFAULT_RUST_VERSION],\n|' WORKSPACE.bazel
365+ - sed -i 's|^rust\.toolchain(|rust.toolchain(versions = ['$(awk '$0 ~ /^DEFAULT_RUST_VERSION = / {print $3}' rust/private/common.bzl)'],\n|' MODULE.bazel
368366 build_targets : *single_rust_channel_targets
369367 test_targets : *single_rust_channel_targets
370368 ubuntu2004_stable_with_aspects :
@@ -373,6 +371,7 @@ tasks:
373371 # Test rules while only registering a nightly toolchain
374372 shell_commands :
375373 - sed -i 's|^rust_register_toolchains(|load("//rust/private:common.bzl", "DEFAULT_RUST_VERSION")\nrust_register_toolchains(versions = [DEFAULT_RUST_VERSION],\n|' WORKSPACE.bazel
374+ - sed -i 's|^rust\.toolchain(|rust.toolchain(versions = ['$(awk '$0 ~ /^DEFAULT_RUST_VERSION = / {print $3}' rust/private/common.bzl)'],\n|' MODULE.bazel
376375 build_flags : *aspects_flags
377376 build_targets : *single_rust_channel_targets
378377 test_flags : *aspects_flags
@@ -383,6 +382,7 @@ tasks:
383382 # Test rules while only registering a nightly toolchain
384383 shell_commands :
385384 - sed -i 's|^rust_register_toolchains(|load("//rust/private:common.bzl", "DEFAULT_NIGHTLY_ISO_DATE")\nrust_register_toolchains(versions = ["nightly/" + DEFAULT_NIGHTLY_ISO_DATE],\n|' WORKSPACE.bazel
385+ - sed -i 's|^rust\.toolchain(|rust.toolchain(versions = ["nightly/'$(awk -F '"' '$0 ~ /^DEFAULT_NIGHTLY_ISO_DATE = / {print $2}' rust/private/common.bzl)'"],\n|' MODULE.bazel
386386 build_flags : *nightly_flags
387387 build_targets : *single_rust_channel_targets
388388 test_flags : *nightly_flags
@@ -393,6 +393,7 @@ tasks:
393393 # Test rules while only registering a nightly toolchain
394394 shell_commands :
395395 - sed -i 's|^rust_register_toolchains(|load("//rust/private:common.bzl", "DEFAULT_NIGHTLY_ISO_DATE")\nrust_register_toolchains(versions = ["nightly/" + DEFAULT_NIGHTLY_ISO_DATE],\n|' WORKSPACE.bazel
396+ - sed -i 's|^rust\.toolchain(|rust.toolchain(versions = ["nightly/'$(awk -F '"' '$0 ~ /^DEFAULT_NIGHTLY_ISO_DATE = / {print $2}' rust/private/common.bzl)'"],\n|' MODULE.bazel
396397 build_flags : *nightly_aspects_flags
397398 build_targets : *single_rust_channel_targets
398399 test_flags : *nightly_aspects_flags
@@ -520,77 +521,69 @@ tasks:
520521 cc_common_link_ubuntu2004 :
521522 name : Build via cc_common.link
522523 platform : ubuntu2004
523- working_directory : test/cc_common_link
524+ working_directory : test/integration/cc_common_link
525+ build_targets :
526+ - " //..."
527+ test_targets :
528+ - " //..."
529+ cc_common_link_macos :
530+ name : Build via cc_common.link
531+ platform : macos_arm64
532+ working_directory : test/integration/cc_common_link
524533 build_targets :
525- - " --"
526534 - " //..."
527- # The with_global_alloc directory is a repository on its own tested in the 'Build via cc_common.link using a global allocator' task.
528- - " -//with_global_alloc/..."
529535 test_targets :
530- - " --"
531536 - " //..."
532- # The with_global_alloc directory is a repository on its own tested in the 'Build via cc_common.link using a global allocator' task.
533- - " -//with_global_alloc/..."
534- build_flags :
535- - " --@rules_rust//rust/settings:experimental_use_cc_common_link=True"
536- test_flags :
537- - " --@rules_rust//rust/settings:experimental_use_cc_common_link=True"
538537 cc_common_link_with_global_alloc_ubuntu2004 :
539538 name : Build via cc_common.link using a global allocator
540539 platform : ubuntu2004
541- working_directory : test/cc_common_link/with_global_alloc
540+ working_directory : test/integration/cc_common_link_with_global_alloc
541+ build_targets :
542+ - " //..."
543+ test_targets :
544+ - " //..."
545+ cc_common_link_with_global_alloc_macos :
546+ name : Build via cc_common.link using a global allocator
547+ platform : macos_arm64
548+ working_directory : test/integration/cc_common_link_with_global_alloc
542549 build_targets :
543550 - " //..."
544551 test_targets :
545552 - " //..."
546- build_flags :
547- - " --@rules_rust//rust/settings:experimental_use_cc_common_link=True"
548- - " --@rules_rust//rust/settings:experimental_use_global_allocator=True"
549- test_flags :
550- - " --@rules_rust//rust/settings:experimental_use_cc_common_link=True"
551- - " --@rules_rust//rust/settings:experimental_use_global_allocator=True"
552553 cc_common_link_no_std_ubuntu2004 :
553554 name : Build with no_std + alloc using cc_common.link infrastructure for linking
554555 platform : ubuntu2004
555- working_directory : test/no_std
556+ working_directory : test/integration/ no_std
556557 build_targets :
557558 - " //..."
558559 test_targets :
559560 - " //..."
560561 build_flags :
561- - " --@rules_rust//rust/toolchain/channel=nightly"
562- - " --@rules_rust//rust/settings:experimental_use_cc_common_link=True"
563- - " --@rules_rust//rust/settings:experimental_use_global_allocator=True"
564- - " --@rules_rust//rust/settings:no_std=alloc"
562+ - " --config=no_std_alloc_using_cc_common_link"
565563 test_flags :
566- - " --@rules_rust//rust/toolchain/channel=nightly"
567- - " --@rules_rust//rust/settings:experimental_use_cc_common_link=True"
568- - " --@rules_rust//rust/settings:experimental_use_global_allocator=True"
569- - " --@rules_rust//rust/settings:no_std=alloc"
564+ - " --config=no_std_alloc_using_cc_common_link"
570565 no_std_ubuntu2004 :
571566 name : Build with no_std + alloc
572567 platform : ubuntu2004
573- working_directory : test/no_std
568+ working_directory : test/integration/ no_std
574569 build_targets :
575570 - " //..."
576571 test_targets :
577572 - " //..."
578573 build_flags :
579- - " --@rules_rust//rust/toolchain/channel=nightly"
580- - " --@rules_rust//rust/settings:no_std=alloc"
574+ - " --config=no_std_alloc"
581575 test_flags :
582- - " --@rules_rust//rust/toolchain/channel=nightly"
583- - " --@rules_rust//rust/settings:no_std=alloc"
576+ - " --config=no_std_alloc"
584577 bzlmod_repo_mapping_runfiles :
585578 name : bzlmod repo mapping test
586579 platform : ubuntu2004
587- working_directory : test/bzlmod_repo_mapping/module_a
580+ working_directory : test/integration/ bzlmod_repo_mapping/module_a
588581 test_targets :
589582 - " //..."
590583 aliased_toolchains :
591584 name : aliased toolchains test
592585 platform : ubuntu2004
593- working_directory : test/aliased_toolchains
586+ working_directory : test/integration/ aliased_toolchains
594587 build_targets :
595588 - " @rust_toolchains//:all"
596589 - " //..."
@@ -1073,6 +1066,8 @@ tasks:
10731066 platform : ubuntu2004
10741067 name : Extensions wasm-bindgen
10751068 working_directory : extensions/wasm_bindgen
1069+ shell_commands :
1070+ - " bash ./test/bazelci_unix_setup.sh"
10761071 build_flags : *aspects_flags
10771072 test_flags : *aspects_flags
10781073 build_targets :
@@ -1090,22 +1085,22 @@ tasks:
10901085 test_flags : *aspects_flags
10911086 build_targets :
10921087 - " //..."
1093- test_targets :
1094- - " --"
1095- - " //..."
1096- # TODO: https://github.com/bazelbuild/rules_rust/issues/3039
1097- - " -//rules_js/test:hello_world_wasm_lib_test"
1098- - " -//rules_js/test:hello_world_wasm_direct_test"
1088+ # TODO: https://github.com/bazelbuild/rules_rust/issues/3039
1089+ # test_targets:
1090+ # - "//..."
10991091 extensions_wasm_bindgen_macos :
11001092 platform : macos_arm64
11011093 name : Extensions wasm-bindgen
1102- working_directory : extensions
1094+ working_directory : extensions/wasm_bindgen
1095+ shell_commands :
1096+ - " bash ./test/bazelci_unix_setup.sh"
11031097 build_flags : *aspects_flags
11041098 test_flags : *aspects_flags
11051099 build_targets :
11061100 - " //..."
1107- test_targets :
1108- - " //..."
1101+ # TODO: https://github.com/bazelbuild/rules_rust/issues/3039
1102+ # test_targets:
1103+ # - "//..."
11091104 extensions_wasm_bindgen_windows :
11101105 platform : windows
11111106 name : Extensions wasm-bindgen
0 commit comments