Test with thread sanitizer in Buildkite using Bazel (#4115)

This will allow for the test to be skipped if it's already cached,
speeding up CI runs.
This commit is contained in:
JP Simard 2022-08-22 19:21:54 -04:00 committed by GitHub
parent 69f3a3b4b7
commit 2960ae6a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 2 deletions

View File

@ -15,3 +15,7 @@ steps:
commands:
- echo "+++ Analyze"
- make analyze
- label: "TSan"
commands:
- echo "+++ Test"
- bazel test --xcode_version_config=//bazel:xcode_config --test_output=streamed --build_tests_only --features=tsan --test_timeout=600 //Tests/...

View File

@ -8,6 +8,13 @@ http_archive(
url = "https://github.com/bazelbuild/rules_apple/releases/download/1.0.1/rules_apple.1.0.1.tar.gz",
)
http_archive(
name = "build_bazel_rules_swift",
sha256 = "7a25fa865205f96fe4924ed137fed02a1b9529afd82ffd14e52186a0aa222cad",
strip_prefix = "rules_swift-469db13330e94af864540d50acdfc742998ef292",
url = "https://github.com/bazelbuild/rules_swift/archive/469db13330e94af864540d50acdfc742998ef292.tar.gz",
)
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",

View File

@ -88,8 +88,6 @@ jobs:
displayName: Pre-cache SwiftLint Run
- script: swift run --configuration release --sanitize thread swiftlint lint --lenient
displayName: Post-cache SwiftLint Run
- script: make test_tsan
displayName: Test With TSan
- job: jazzy
pool:

View File

@ -3,3 +3,38 @@ filegroup(
srcs = glob(["*"]),
visibility = ["//visibility:public"],
)
xcode_version(
name = "version14_0_0_14A5294e",
aliases = [
"14.0.0.14A5294e",
"14A5294e",
],
default_ios_sdk_version = "16.0",
default_macos_sdk_version = "13.0",
default_tvos_sdk_version = "16.0",
default_watchos_sdk_version = "9.0",
version = "14.0.0.14A5294e",
)
available_xcodes(
name = "local_xcodes",
default = ":version14_0_0_14A5294e",
versions = [
":version14_0_0_14A5294e",
],
)
available_xcodes(
name = "remote_xcodes",
default = ":version14_0_0_14A5294e",
versions = [
":version14_0_0_14A5294e",
],
)
xcode_config(
name = "xcode_config",
local_versions = ":local_xcodes",
remote_versions = ":remote_xcodes",
)