xref: /aosp_15_r20/external/bazelbuild-rules_rust/.bcr/presubmit.yml (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1bcr_test_module:
2  module_path: ""
3  matrix:
4    platform: ["macos", "ubuntu2004"]
5    bazel: ["6.x", "7.x"]
6  tasks:
7    run_tests:
8      working_directory: examples/bzlmod/hello_world
9      name: "Run test module"
10      platform: ${{ platform }}
11      bazel: ${{ bazel }}
12      # Remove the lockfile because we generate on Bazel 7, but test on Bazel 6 which may not be able to parse a future-generated lockfile.
13      shell_commands:
14        - "rm MODULE.bazel.lock"
15      run_targets:
16        - "//third-party:vendor"
17        - "@rules_rust//tools/rust_analyzer:gen_rust_project"
18      test_targets:
19        - "//..."
20# Windows is run separately because currently gen_rust_project doesn't run on windows, although it does build
21bcr_test_module_windows:
22  module_path: ""
23  matrix:
24    bazel: ["6.x", "7.x"]
25  tasks:
26    run_tests:
27      working_directory: examples/bzlmod/hello_world
28      name: "Run test module"
29      platform: windows
30      bazel: ${{ bazel }}
31      # Remove the lockfile because we generate on Bazel 7, but test on Bazel 6 which may not be able to parse a future-generated lockfile.
32      shell_commands:
33        - "rm MODULE.bazel.lock"
34      run_targets:
35        - "//third-party:vendor"
36      build_targets:
37        - "@rules_rust//tools/rust_analyzer:gen_rust_project"
38      test_targets:
39        - "//..."
40