From c8e76212aba8a9b52d885cba76202ab8c6c091b6 Mon Sep 17 00:00:00 2001 From: Jordan Santell Date: Tue, 27 Jun 2023 22:39:37 -0700 Subject: [PATCH] chore: Add ASan to swift tests (#450) --- .github/workflows/run_test_suite.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test_suite.yaml b/.github/workflows/run_test_suite.yaml index c29d0be37..d5a0010dc 100644 --- a/.github/workflows/run_test_suite.yaml +++ b/.github/workflows/run_test_suite.yaml @@ -30,8 +30,12 @@ jobs: sed -i '' -e "s#url: \"[^\"]*\",#path: \"./LibNoosphere.xcframework\"),#" ./Package.swift sed -i '' -e "s#checksum: \"[^\"]*\"),##" ./Package.swift - swift build - swift test + # Enable malloc debugging features + # https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html + export MallocPreScribble=1 + export MallocScribble=1 + swift build --sanitize=address + swift test --sanitize=address run-test-suite-windows: runs-on: windows-latest