2021-07-27 18:08:18 -04:00
|
|
|
name: Sanitizer checks
|
|
|
|
|
2022-07-24 17:25:38 -04:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '**'
|
|
|
|
- '!docs/**'
|
|
|
|
- '!.**'
|
|
|
|
- '.github/workflows/sanitizer.yml'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- v[0-9].*
|
|
|
|
- master
|
2021-07-27 18:08:18 -04:00
|
|
|
|
|
|
|
jobs:
|
2022-01-04 21:04:05 -05:00
|
|
|
sanitizers:
|
2023-05-21 17:36:51 -04:00
|
|
|
runs-on: ubuntu-22.04
|
2021-07-27 18:08:18 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-04 21:04:05 -05:00
|
|
|
- name: Setup
|
|
|
|
run: |
|
|
|
|
sudo apt-get install ninja-build
|
2021-07-27 18:08:18 -04:00
|
|
|
- name: Envinfo
|
|
|
|
run: npx envinfo
|
2023-05-21 17:36:51 -04:00
|
|
|
|
|
|
|
- name: ASAN Build
|
|
|
|
run: |
|
|
|
|
mkdir build-asan
|
|
|
|
(cd build-asan && cmake .. -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: |
|
|
|
|
mkdir build-msan
|
|
|
|
(cd build-msan && cmake .. -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
|
|
|
|
|
2022-07-24 17:25:38 -04:00
|
|
|
- name: TSAN Build
|
2022-01-04 21:04:05 -05:00
|
|
|
run: |
|
|
|
|
mkdir build-tsan
|
|
|
|
(cd build-tsan && cmake .. -G Ninja -DBUILD_TESTING=ON -DTSAN=ON -DCMAKE_BUILD_TYPE=Release)
|
|
|
|
cmake --build build-tsan
|
2022-07-24 17:25:38 -04:00
|
|
|
- name: TSAN Test
|
2023-05-21 17:36:51 -04:00
|
|
|
# Note: path must be absolute because some tests chdir.
|
|
|
|
# TSan exits with an error when it can't find the file.
|
2022-07-24 17:25:38 -04:00
|
|
|
run: |
|
2023-05-21 17:36:51 -04:00
|
|
|
env TSAN_OPTIONS="suppressions=$PWD/tsansupp.txt" ./build-tsan/uv_run_tests_a
|
|
|
|
|
|
|
|
- name: UBSAN Build
|
2021-07-27 18:08:18 -04:00
|
|
|
run: |
|
2023-05-21 17:36:51 -04:00
|
|
|
mkdir build-ubsan
|
|
|
|
(cd build-ubsan && cmake .. -G Ninja -DBUILD_TESTING=ON -DUBSAN=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang)
|
|
|
|
cmake --build build-ubsan
|
|
|
|
- name: UBSAN Test
|
2022-07-24 17:25:38 -04:00
|
|
|
run: |
|
2023-05-21 17:36:51 -04:00
|
|
|
./build-ubsan/uv_run_tests_a
|