Skip to content

Commit 5748cdf

Browse files
committed
Add sanitizer checks to GH workflows
1 parent 8a34ac8 commit 5748cdf

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/basic.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ jobs:
1717
pool_tracking: ['ON', 'OFF']
1818
shared_library: ['OFF']
1919
os_provider: ['ON']
20+
sanitizers: ['ON', 'OFF']
2021
include:
2122
- os: 'ubuntu-20.04'
2223
build_type: Release
2324
compiler: {c: gcc-7, cxx: g++-7}
2425
shared_library: 'OFF'
2526
- os: 'ubuntu-22.04'
2627
build_type: Release
27-
compiler: {c: clang, cxx: clang++}
28+
compiler: {c: clang, cxx: clang++}
2829
shared_library: 'OFF'
2930
- os: 'ubuntu-22.04'
3031
build_type: Release
@@ -42,17 +43,23 @@ jobs:
4243
compiler: {c: gcc, cxx: g++}
4344
shared_library: 'OFF'
4445
os_provider: 'OFF'
46+
exclude:
47+
# TODO: Remove this exclusion. There's a leak reported by sanitizer
48+
# in jemalloc pool implementation that points to a tracker_value_t
49+
# not being free'd.
50+
- pool_tracking: 'ON'
51+
sanitizers: 'ON'
4552
runs-on: ${{matrix.os}}
4653

4754
steps:
4855
- name: Checkout
4956
uses: actions/checkout@v4
50-
57+
5158
- name: Install apt packages
5259
run: |
5360
sudo apt-get update
5461
sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev libtbb-dev
55-
62+
5663
- name: Install g++-7
5764
if: matrix.compiler.cxx == 'g++-7'
5865
run: |
@@ -74,11 +81,13 @@ jobs:
7481
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
7582
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
7683
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
84+
-DUSE_ASAN=${{matrix.sanitizers}}
85+
-DUSE_UBSAN=${{matrix.sanitizers}}
7786
7887
- name: Build UMF
7988
run: |
8089
cmake --build ${{env.BUILD_DIR}} -j $(nproc)
81-
90+
8291
- name: Run tests
8392
working-directory: ${{env.BUILD_DIR}}
8493
run: |
@@ -102,6 +111,7 @@ jobs:
102111
compiler: [{c: cl, cxx: cl}]
103112
pool_tracking: ['ON', 'OFF']
104113
shared_library: ['OFF']
114+
sanitizers: ['ON', 'OFF']
105115
include:
106116
- os: 'windows-2022'
107117
build_type: Release
@@ -130,6 +140,8 @@ jobs:
130140
-DUMF_FORMAT_CODE_STYLE=OFF
131141
-DUMF_DEVELOPER_MODE=ON
132142
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
143+
-DUSE_ASAN=${{matrix.sanitizers}}
144+
-DUSE_UBSAN=${{matrix.sanitizers}}
133145
134146
- name: Build UMF
135147
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
@@ -160,7 +172,7 @@ jobs:
160172
-DUMF_DEVELOPER_MODE=ON
161173
-DUMF_ENABLE_POOL_TRACKING=ON
162174
163-
- name: Run code-style check
175+
- name: Run code-style check
164176
run: |
165177
cmake --build ${{env.BUILD_DIR}} --target clang-format-check
166178

0 commit comments

Comments
 (0)