-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add
//bzlmod:hello_world_test
and use it as BCR presubmit (#…
…2347) - Create `bzlmod/hello_world` package based upon `examples/bzlmod/hello_world`. - Add `rules_bazel_integration_test` so that `//bzlmod:hello_world_test` can be executed as a test from the parent workspace. - Add `filegroup` targets named `all_files` to collect files for all of the packages that are necessary to use `rules_rust`. These are an input to the `rules_bazel_integration_test` test. - Replace `.bcr/presubmit.yml` to test `//bzlmod:hello_world_test`. - Update CI to test `//bzlmod:hello_world_test`. Related to bazelbuild/bazel-central-registry#1199 (comment).
- Loading branch information
Showing
12 changed files
with
14,951 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
bzlmod | ||
docs | ||
examples | ||
crate_universe/private/bootstrap | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
bcr_test_module: | ||
module_path: "" | ||
matrix: | ||
platform: ["macos", "ubuntu2004"] | ||
tasks: | ||
run_tests: | ||
working_directory: bzlmod/hello_world | ||
name: "Run test module" | ||
platform: ${{ platform }} | ||
test_targets: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Required on windows | ||
common --enable_platform_specific_config | ||
startup --windows_enable_symlinks | ||
build:windows --enable_runfiles | ||
|
||
build --experimental_enable_bzlmod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
rust_binary( | ||
name = "hello_world", | ||
srcs = ["src/main.rs"], | ||
) | ||
|
||
rust_doc( | ||
name = "hello_world_doc", | ||
crate = ":hello_world", | ||
) | ||
|
||
sh_test( | ||
name = "hello_world_test", | ||
srcs = ["hello_world_test.sh"], | ||
args = [ | ||
"$(rootpath :hello_world)", | ||
], | ||
data = [ | ||
":hello_world", | ||
], | ||
deps = [ | ||
"@bazel_tools//tools/bash/runfiles", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module( | ||
name = "hello_world_example", | ||
version = "0.0.0", | ||
) | ||
|
||
bazel_dep(name = "rules_rust", version = "0.0.0") | ||
local_path_override( | ||
module_name = "rules_rust", | ||
path = "../..", | ||
) | ||
|
||
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") | ||
rust.toolchain(edition = "2021") | ||
use_repo( | ||
rust, | ||
"rust_toolchains", | ||
) | ||
|
||
register_toolchains("@rust_toolchains//:all") |
Oops, something went wrong.