Skip to content

Commit 3489cfa

Browse files
authored
Merge pull request #168 from kswiecicki/asan-windows
Add ASan workflow for Windows
2 parents c652cec + 570f1c6 commit 3489cfa

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/basic.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
compiler: [{c: cl, cxx: cl}]
136136
pool_tracking: ['ON', 'OFF']
137137
shared_library: ['OFF']
138+
sanitizers: [{asan: OFF}]
138139
include:
139140
- os: 'windows-2022'
140141
build_type: Release
@@ -146,12 +147,36 @@ jobs:
146147
compiler: {c: cl, cxx: cl}
147148
pool_tracking: 'ON'
148149
shared_library: 'ON'
150+
- os: 'windows-2022'
151+
build_type: Debug
152+
compiler: {c: cl, cxx: cl}
153+
pool_tracking: 'OFF'
154+
shared_library: 'OFF'
155+
sanitizers: {asan: ON}
156+
- os: 'windows-2022'
157+
build_type: Debug
158+
compiler: {c: clang-cl, cxx: clang-cl}
159+
pool_tracking: 'OFF'
160+
shared_library: 'OFF'
161+
sanitizers: {asan: ON}
149162

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

152165
steps:
153166
- uses: actions/checkout@v4
154167

168+
# Use '14.38.33130' MSVC toolset when compiling UMF with ASan.
169+
# Running binaries compiled with older toolsets results in a
170+
# 'STATUS_DLL_INIT_FAILED' error despite being linked with ASan from
171+
# the same toolset as the compiler being used.
172+
# https://github.com/actions/runner-images/issues/8891
173+
- name: Setup MSVC dev command prompt
174+
if: matrix.os == 'windows-2022' && matrix.sanitizers.asan == 'ON'
175+
uses: TheMrMilchmann/setup-msvc-dev@v3
176+
with:
177+
arch: x64
178+
toolset: 14.38.33130
179+
155180
- name: Configure build
156181
run: >
157182
cmake
@@ -164,6 +189,7 @@ jobs:
164189
-DUMF_FORMAT_CODE_STYLE=OFF
165190
-DUMF_DEVELOPER_MODE=ON
166191
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
192+
-DUSE_ASAN=${{matrix.sanitizers.asan}}
167193
168194
- name: Build UMF
169195
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS

0 commit comments

Comments
 (0)