Update sanitizer.yml #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sanitizer checks | |
on: | |
pull_request: | |
paths: | |
- '**' | |
- '!docs/**' | |
- '!.**' | |
- '.github/workflows/sanitizer.yml' | |
push: | |
branches: | |
- v[0-9].* | |
- master | |
jobs: | |
sanitizers-linux: | |
runs-on: ubuntu-22.04x | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup | |
run: | | |
sudo apt-get install ninja-build | |
- name: ASAN Build | |
run: | | |
cmake -B build-asan -S . -G Ninja -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug | |
cmake --build build-asan | |
- name: ASAN Test | |
run: | | |
./build-asan/uv_run_tests_a | |
- name: MSAN Build | |
run: | | |
cmake -B build-msan -S . -G Ninja -DBUILD_TESTING=ON -DMSAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang | |
cmake --build build-msan | |
- name: MSAN Test | |
run: | | |
./build-msan/uv_run_tests_a | |
- name: TSAN Build | |
run: | | |
cmake -B build-tsan -S . -G Ninja -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build-tsan | |
- name: TSAN Test | |
# Note: path must be absolute because some tests chdir. | |
# TSan exits with an error when it can't find the file. | |
run: | | |
env TSAN_OPTIONS="suppressions=$PWD/tsansupp.txt" ./build-tsan/uv_run_tests_a | |
- name: UBSAN Build | |
run: | | |
cmake -B build-ubsan -S . -G Ninja -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang | |
cmake --build build-ubsan | |
- name: UBSAN Test | |
run: | | |
./build-ubsan/uv_run_tests_a | |
sanitizers-macos: | |
runs-on: macos-11x | |
steps: | |
- uses: actions/checkout@v2 | |
- name: ASAN Build | |
run: | | |
cmake -B build-asan -S . -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug | |
cmake --build build-asan | |
- name: ASAN Test | |
run: | | |
./build-asan/uv_run_tests_a | |
- name: TSAN Build | |
run: | | |
cmake -B build-tsan -S . -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build-tsan | |
- name: TSAN Test | |
run: | | |
./build-tsan/uv_run_tests_a | |
- name: UBSAN Build | |
run: | | |
cmake -B build-ubsan -S . -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug | |
cmake --build build-ubsan | |
- name: UBSAN Test | |
run: | | |
./build-ubsan/uv_run_tests_a | |
sanitizers-windows: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup | |
run: | | |
choco install ninja | |
# Note: clang shipped with VS2022 has an issue where the UBSAN runtime doesn't link. | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "17" | |
- name: UBSAN Configure | |
run: | |
cmake -B build-ubsan -S . -G Ninja -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang | |
- name: UBSAN Build | |
cmake --build build-ubsan | |
- name: UBSAN Test | |
run: | | |
./build-ubsan/uv_run_tests_a | |
- name: ASAN Configure | |
run: | |
cmake -B build-asan -S . -G Ninja -DBUILD_TESTING=ON -DASAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang | |
- name: ASAN Build | |
run: | |
cmake --build build-asan | |
- name: ASAN Test | |
run: | | |
./build-asan/uv_run_tests_a |