mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
CI: Move ASan/UBSan to own build directory
This commit is contained in:
parent
228d9967cb
commit
a9157e8385
7
.github/workflows/clang-sanitizer.yml
vendored
7
.github/workflows/clang-sanitizer.yml
vendored
|
@ -24,14 +24,17 @@ jobs:
|
|||
uses: Swatinem/rust-cache@v2
|
||||
- name: Build with ASan and UBSan
|
||||
run: |
|
||||
mkdir clang-sanitizer
|
||||
cd clang-sanitizer
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer"
|
||||
export CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer"
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DHEADLESS_CLIENT=ON -Werror=dev -DDOWNLOAD_GTEST=ON -DDEV=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=. .
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DHEADLESS_CLIENT=ON -Werror=dev -DDOWNLOAD_GTEST=ON -DDEV=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=. ..
|
||||
make -j"$(nproc)"
|
||||
- name: Run server and headless client with ASan and UBSan
|
||||
run: |
|
||||
cd clang-sanitizer
|
||||
export UBSAN_OPTIONS=suppressions=./ubsan.supp:log_path=./SAN:print_stacktrace=1:halt_on_errors=0
|
||||
export ASAN_OPTIONS=log_path=./SAN:print_stacktrace=1:check_initialization_order=1:detect_leaks=1:halt_on_errors=0
|
||||
export LSAN_OPTIONS=suppressions=./lsan.supp
|
||||
|
@ -44,6 +47,7 @@ jobs:
|
|||
fi
|
||||
- name: Run unit tests with ASan and UBSan
|
||||
run: |
|
||||
cd clang-sanitizer
|
||||
cmake --build . --config Debug --target run_cxx_tests
|
||||
# Rust tests work locally, but still not in CI, even with the same directory
|
||||
if test -n "$(find . -maxdepth 1 -name 'SAN.*' -print -quit)"
|
||||
|
@ -53,6 +57,7 @@ jobs:
|
|||
fi
|
||||
- name: Run integration tests with ASan and UBSan
|
||||
run: |
|
||||
cd clang-sanitizer
|
||||
make run_integration_tests
|
||||
if test -n "$(find . -maxdepth 1 -name 'SAN.*' -print -quit)"
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue