Skip to content

Commit 2523528

Browse files
committed
Combine sanitizer actions into a single file
1 parent 92feada commit 2523528

File tree

2 files changed

+12
-59
lines changed

2 files changed

+12
-59
lines changed

.github/workflows/cmake_ubuntu_aubsan.yml renamed to .github/workflows/cmake_ubuntu_sanitizers.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cmake Ubuntu with Address and Undefined Behavior Sanitizers
1+
name: cmake Ubuntu Sanitizers
22

33
on:
44
push:
@@ -21,6 +21,7 @@ jobs:
2121
strategy:
2222
matrix:
2323
os: [ubuntu-22.04]
24+
sanitizer: [asan_ubsan, tsan]
2425

2526
steps:
2627
- uses: actions/checkout@v2
@@ -43,7 +44,14 @@ jobs:
4344

4445
- name: Configure CMake
4546
shell: bash
46-
run: cmake --preset conan-${{ env.BUILD_TYPE_LOWERCASE }} -DBTCPP_ENABLE_ASAN:BOOL=ON -DBTCPP_ENABLE_UBSAN:BOOL=ON
47+
run: |
48+
if [[ "${{ matrix.sanitizer }}" == "asan_ubsan" ]]; then
49+
cmake --preset conan-${{ env.BUILD_TYPE_LOWERCASE }} \
50+
-DBTCPP_ENABLE_ASAN:BOOL=ON -DBTCPP_ENABLE_UBSAN:BOOL=ON
51+
else
52+
cmake --preset conan-${{ env.BUILD_TYPE_LOWERCASE }} \
53+
-DBTCPP_ENABLE_TSAN:BOOL=ON
54+
fi
4755
4856
- name: Build
4957
shell: bash
@@ -54,4 +62,5 @@ jobs:
5462
GTEST_COLOR: "On"
5563
ASAN_OPTIONS: "color=always"
5664
UBSAN_OPTIONS: "halt_on_error=1:print_stacktrace=1:color=always"
57-
run: ctest --test-dir build/${{env.BUILD_TYPE}}
65+
TSAN_OPTIONS: "color=always"
66+
run: sudo sysctl vm.mmap_rnd_bits=28 && ctest --test-dir build/${{env.BUILD_TYPE}} --output-on-failure

.github/workflows/cmake_ubuntu_tsan.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)