Skip to content

Commit

Permalink
gh ci: swith to ninja, reenable asan on msvc, explicitly name latest …
Browse files Browse the repository at this point in the history
…msvc toolchain

ref actions/runner-images#8891
  • Loading branch information
iboB committed Dec 29, 2023
1 parent 0db7d83 commit 4462b44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v3
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: VC Vars
# Setup vcvars on Windows
# MSVC's address sanitizer attaches dependencies to several DLLs which are not in PATH
# vcvars will add them to PATH and allow msvc asan executables to run
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
toolset: 14.38.33130
- name: Configure ASAN
run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DSAN_ADDR=1
run: cmake . -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DSAN_ADDR=1
- name: Build ASAN
run: cmake --build . --config ${{ matrix.type }}
run: cmake --build .
- name: Test ASAN
run: ctest -C ${{ matrix.type }} --output-on-failure
run: ctest --output-on-failure
env:
UBSAN_OPTIONS: halt_on_error=1
- name: Configure TSAN
run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DSAN_ADDR=0 -DSAN_THREAD=1
run: cmake . -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DSAN_ADDR=0 -DSAN_THREAD=1
- name: Build TSAN
run: cmake --build . --config ${{ matrix.type }}
run: cmake --build .
- name: Test TSAN
run: ctest -L tsan -C ${{ matrix.type }} --output-on-failure
run: ctest -L tsan --output-on-failure
2 changes: 1 addition & 1 deletion dev.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ option(SAN_LEAK "itlib: sanitize leaks" OFF)

if(MSVC)
if(SAN_ADDR)
# add_compile_options(-fsanitize=address)
add_compile_options(-fsanitize=address)
endif()
if(SAN_THREAD OR SAN_UB OR SAN_LEAK)
message(WARNING "Unsupported sanitizers requested for msvc. Ignored")
Expand Down

0 comments on commit 4462b44

Please sign in to comment.