Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced CI flags with compatibility flags for incompatible targets #1107

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ tasks:
test_targets:
- "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
- "//..."
# This test requires --incompatible_macos_set_install_name and Bazel 4.2.0+
- "-//ffi/rust_calling_c:matrix_dylib_test"
build_flags: *aspects_flags
windows_examples:
name: Examples
Expand All @@ -239,8 +237,6 @@ tasks:
windows_targets: &windows_targets
- "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
- "//..."
- "-//ffi/rust_calling_c:matrix_dylib_test"
- "-//ffi/rust_calling_c:matrix_dynamically_linked"
# The bindgen rules currently do not work on windows
# see: https://github.com/bazelbuild/rules_rust/issues/919
- "-//bindgen/..."
Expand Down
12 changes: 12 additions & 0 deletions examples/ffi/rust_calling_c/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ rust_library(
"src/matrix.rs",
],
crate_root = "src/matrix.rs",
target_compatible_with = select({
# TODO: Make this work on windows
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
deps = [
"//ffi/rust_calling_c/c:native_matrix_so",
"@libc",
Expand All @@ -42,6 +47,13 @@ rust_library(
rust_test(
name = "matrix_dylib_test",
crate = ":matrix_dynamically_linked",
target_compatible_with = select({
# TODO: This test requires --incompatible_macos_set_install_name and Bazel 4.2.0+
"@platforms//os:macos": ["@platforms//:incompatible"],
# TODO: Make this work on windows
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
)

rust_doc(
Expand Down