Skip to content

Commit

Permalink
Replaced CI flags with compatibility flags for incompatible targets
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Jan 27, 2022
1 parent d0adb02 commit 8dc8917
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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 @@ -37,11 +37,23 @@ rust_library(
"//ffi/rust_calling_c/c:native_matrix_so",
"@libc",
],
target_compatible_with = select({
# TODO: Make this work on windows
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
})
)

rust_test(
name = "matrix_dylib_test",
crate = ":matrix_dynamically_linked",
target_compatible_with = select({
# TODO: Make this work on windows
"@platforms//os:windows": ["@platforms//:incompatible"],
# TODO: This test requires --incompatible_macos_set_install_name and Bazel 4.2.0+
"@platforms//os:macos": ["@platforms//:incompatible"],
"//conditions:default": [],
})
)

rust_doc(
Expand Down

0 comments on commit 8dc8917

Please sign in to comment.