From 6075e787d05e609bd5e0c64acb0f5eb1dc623dde Mon Sep 17 00:00:00 2001 From: Shawn Xu Date: Mon, 16 Dec 2024 13:35:15 -0800 Subject: [PATCH] Add CI test with glibcxx assertions enabled Re: https://github.com/official-stockfish/Stockfish/pull/5721#pullrequestreview-2504542601 closes https://github.com/official-stockfish/Stockfish/pull/5723 No functional change --- .github/workflows/sanitizers.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml index 946a81cec4a..950435f30a1 100644 --- a/.github/workflows/sanitizers.yml +++ b/.github/workflows/sanitizers.yml @@ -21,19 +21,28 @@ jobs: sanitizers: - name: Run with thread sanitizer make_option: sanitize=thread + cxx_extra_flags: "" instrumented_option: sanitizer-thread - name: Run with UB sanitizer make_option: sanitize=undefined + cxx_extra_flags: "" instrumented_option: sanitizer-undefined - name: Run under valgrind make_option: "" + cxx_extra_flags: "" instrumented_option: valgrind - name: Run under valgrind-thread make_option: "" + cxx_extra_flags: "" instrumented_option: valgrind-thread - name: Run non-instrumented make_option: "" + cxx_extra_flags: "" instrumented_option: none + - name: Run with glibcxx assertions + make_option: "" + cxx_extra_flags: -D_GLIBCXX_ASSERTIONS + instrumented_option: non defaults: run: working-directory: src @@ -72,7 +81,7 @@ jobs: - name: ${{ matrix.sanitizers.name }} run: | - export CXXFLAGS="-O1 -fno-inline" + export CXXFLAGS="-O1 -fno-inline ${{ matrix.sanitizers.cxx_extra_flags }}" make clean make -j4 ARCH=x86-64-sse41-popcnt ${{ matrix.sanitizers.make_option }} debug=yes optimize=no build > /dev/null python3 ../tests/instrumented.py --${{ matrix.sanitizers.instrumented_option }} ./stockfish