Skip to content

Commit

Permalink
Replaced CI flags with compatibility flags for incompatible targets (b…
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre authored and cfredric committed Feb 16, 2022
1 parent e2ebcb6 commit 0bf2c2d
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 @@ -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

0 comments on commit 0bf2c2d

Please sign in to comment.