try to enable windows ASAN

pull/794/head
Brad House 5 months ago
parent 268092a390
commit 6d27b72b93
  1. 34
      .github/workflows/msys2.yml

@ -17,10 +17,10 @@ jobs:
max-parallel: 2 max-parallel: 2
matrix: matrix:
include: include:
- { msystem: MINGW64, env: x86_64, cmake_opts: "" } - { msystem: MINGW64, env: x86_64 }
- { msystem: MINGW32, env: i686, cmake_opts: "" } - { msystem: MINGW32, env: i686 }
- { msystem: UCRT64, env: ucrt-x86_64, cmake_opts: "" } - { msystem: UCRT64, env: ucrt-x86_64 }
- { msystem: CLANG64, env: clang-x86_64, cmake_opts: "-DCMAKE_CXX_FLAGS=-fsanitize=undefined -DCMAKE_C_FLAGS=-fsanitize=undefined -DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=undefined -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=undefined" } - { msystem: CLANG64, env: clang-x86_64 }
defaults: defaults:
run: run:
shell: msys2 {0} shell: msys2 {0}
@ -41,18 +41,18 @@ jobs:
mingw-w64-${{ matrix.env }}-ninja mingw-w64-${{ matrix.env }}-ninja
mingw-w64-${{ matrix.env }}-gtest mingw-w64-${{ matrix.env }}-gtest
- name: Install gcc compiler - name: Install gcc compiler
if: ${{ matrix.env != 'clang-x86_64' }} if: ${{ matrix.env == 'clang-x86_64' || matrix.env == 'clang-i686' }}
run: | run: |
pacman --noconfirm -S --needed mingw-w64-${{ matrix.env }}-gcc pacman --noconfirm -S --needed mingw-w64-${{ matrix.env }}-gcc
- name: Install clang compiler - name: Install clang compiler
if: ${{ matrix.env == 'clang-x86_64' }} if: ${{ matrix.env == 'clang-x86_64' || matrix.env == 'clang-i686' }}
run: | run: |
pacman --noconfirm -S --needed mingw-w64-${{ matrix.env }}-clang mingw-w64-${{ matrix.env }}-clang-analyzer pacman --noconfirm -S --needed mingw-w64-${{ matrix.env }}-clang mingw-w64-${{ matrix.env }}-clang-analyzer
- name: Checkout c-ares - name: Checkout c-ares
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: "CMake: build and test c-ares" - name: "CMake: build and test c-ares"
run: | run: |
cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=C:/projects/build-cares/test_install -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON ${{ matrix.cmake_opts }} -Bbuild_cmake -G Ninja . cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=C:/projects/build-cares/test_install -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON -Bbuild_cmake -G Ninja .
cmake --build build_cmake cmake --build build_cmake
./build_cmake/bin/adig.exe www.google.com ./build_cmake/bin/adig.exe www.google.com
./build_cmake/bin/ahost.exe www.google.com ./build_cmake/bin/ahost.exe www.google.com
@ -67,3 +67,23 @@ jobs:
./src/tools/adig.exe www.google.com ./src/tools/adig.exe www.google.com
./src/tools/ahost.exe www.google.com ./src/tools/ahost.exe www.google.com
./test/arestest.exe -4 -v --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr* ./test/arestest.exe -4 -v --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr*
- name: "CMake: UBSAN: build and test c-ares"
if: ${{ matrix.env == 'clang-x86_64' || matrix.env == 'clang-i686' }}
env:
CMAKE_OPTS: "-DCMAKE_CXX_FLAGS=-fsanitize=undefined -DCMAKE_C_FLAGS=-fsanitize=undefined -DCMAKE_STATIC_LINKER_FLAGS=-fsanitize=undefined -DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=undefined -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=undefined"
run: |
cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=C:/projects/build-cares/test_install -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON ${{ env.CMAKE_OPTS }} -Bbuild_cmake -G Ninja .
cmake --build build_cmake
./build_cmake/bin/adig.exe www.google.com
./build_cmake/bin/ahost.exe www.google.com
./build_cmake/bin/arestest.exe -4 -v --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr*
- name: "CMake: ASAN: build and test c-ares"
if: ${{ matrix.env == 'clang-x86_64' || matrix.env == 'clang-i686' }}
env:
CMAKE_OPTS: "-DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_STATIC_LINKER_FLAGS=-fsanitize=address -DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address"
run: |
cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=C:/projects/build-cares/test_install -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON ${{ env.CMAKE_OPTS }} -Bbuild_cmake -G Ninja .
cmake --build build_cmake
./build_cmake/bin/adig.exe www.google.com
./build_cmake/bin/ahost.exe www.google.com
./build_cmake/bin/arestest.exe -4 -v --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr*

Loading…
Cancel
Save