Merge pull request #265 from comius:rules-shell-in-cc

PiperOrigin-RevId: 693699461
Change-Id: Icd113a5668da50f186836ca79036f6620ad0bfce
This commit is contained in:
Copybara-Service 2024-11-06 07:35:39 -08:00
commit 76413676fc
4 changed files with 16 additions and 5 deletions

View File

@ -5,14 +5,12 @@ build_targets: &build_targets
- "//examples/..." - "//examples/..."
- "//tests/..." - "//tests/..."
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
test_targets: &test_targets test_targets: &test_targets
- "//:all" - "//:all"
- "//cc/..." - "//cc/..."
- "//examples/..." - "//examples/..."
- "//tests/..." - "//tests/..."
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
build_targets_bazel_6: &build_targets_bazel_6 build_targets_bazel_6: &build_targets_bazel_6
- "//:all" - "//:all"
@ -22,7 +20,6 @@ build_targets_bazel_6: &build_targets_bazel_6
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
- "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None - "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None
- "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6 - "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
test_targets_bazel_6: &test_targets_bazel_6 test_targets_bazel_6: &test_targets_bazel_6
- "//:all" - "//:all"
- "//cc:all" - "//cc:all"
@ -31,7 +28,6 @@ test_targets_bazel_6: &test_targets_bazel_6
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
- "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None - "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None
- "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6 - "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
buildifier: buildifier:
version: latest version: latest
@ -79,7 +75,6 @@ tasks:
- "//tests/..." - "//tests/..."
- "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux
- "-//tests/system_library:system_library_test" # Fails because of repo setup - "-//tests/system_library:system_library_test" # Fails because of repo setup
- "-//tests/rule_based_toolchain/tool_map:_duplicate_tool_test_subject" # Intentionally broken rule.
macos_head: macos_head:
name: MacOS (Bazel HEAD) name: MacOS (Bazel HEAD)
bazel: last_green bazel: last_green

View File

@ -13,5 +13,6 @@ use_repo(cc_configure, "local_config_cc", "local_config_cc_toolchains")
register_toolchains("@local_config_cc_toolchains//:all") register_toolchains("@local_config_cc_toolchains//:all")
bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True)
bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True) bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.7.0", dev_dependency = True) bazel_dep(name = "stardoc", version = "0.7.0", dev_dependency = True)

View File

@ -24,6 +24,19 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace() bazel_skylib_workspace()
http_archive(
name = "rules_shell",
sha256 = "410e8ff32e018b9efd2743507e7595c26e2628567c42224411ff533b57d27c28",
strip_prefix = "rules_shell-0.2.0",
url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.2.0/rules_shell-v0.2.0.tar.gz",
)
load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")
rules_shell_dependencies()
rules_shell_toolchains()
http_archive( http_archive(
name = "rules_testing", name = "rules_testing",
sha256 = "02c62574631876a4e3b02a1820cb51167bb9cdcdea2381b2fa9d9b8b11c407c4", sha256 = "02c62574631876a4e3b02a1820cb51167bb9cdcdea2381b2fa9d9b8b11c407c4",

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("//third_party/rules_shell/shell:sh_test.bzl", "sh_test")
sh_test( sh_test(
name = "system_library_test", name = "system_library_test",
size = "small", size = "small",