mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
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
This commit is contained in:
11
.github/workflows/sanitizers.yml
vendored
11
.github/workflows/sanitizers.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user