From 4462b44e0a6e34fdb15f03de89e5e85f85a54e7d Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Fri, 29 Dec 2023 14:46:30 +0200 Subject: [PATCH] gh ci: swith to ninja, reenable asan on msvc, explicitly name latest msvc toolchain ref https://github.com/actions/runner-images/issues/8891 --- .github/workflows/build.yml | 17 +++++++++++------ dev.cmake | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0613349..6dea9b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/dev.cmake b/dev.cmake index 8b42fa9..0ae3843 100644 --- a/dev.cmake +++ b/dev.cmake @@ -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")