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

Add ASan workflow for Windows #168

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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
26 changes: 26 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
compiler: [{c: cl, cxx: cl}]
pool_tracking: ['ON', 'OFF']
shared_library: ['OFF']
sanitizers: [{asan: OFF}]
include:
- os: 'windows-2022'
build_type: Release
Expand All @@ -146,12 +147,36 @@ jobs:
compiler: {c: cl, cxx: cl}
pool_tracking: 'ON'
shared_library: 'ON'
- os: 'windows-2022'
build_type: Debug
compiler: {c: cl, cxx: cl}
pool_tracking: 'OFF'
shared_library: 'OFF'
sanitizers: {asan: ON}
- os: 'windows-2022'
build_type: Debug
compiler: {c: clang-cl, cxx: clang-cl}
pool_tracking: 'OFF'
shared_library: 'OFF'
sanitizers: {asan: ON}

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4

# Use '14.38.33130' MSVC toolset when compiling UMF with ASan.
# Running binaries compiled with older toolsets results in a
# 'STATUS_DLL_INIT_FAILED' error despite being linked with ASan from
# the same toolset as the compiler being used.
# https://github.com/actions/runner-images/issues/8891
- name: Setup MSVC dev command prompt
if: matrix.os == 'windows-2022' && matrix.sanitizers.asan == 'ON'
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
toolset: 14.38.33130

- name: Configure build
run: >
cmake
Expand All @@ -164,6 +189,7 @@ jobs:
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
-DUSE_ASAN=${{matrix.sanitizers.asan}}

- name: Build UMF
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
Expand Down