From f29fda9a391af1ee05258cb143959e867b67ce23 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 16 Mar 2025 16:24:44 +0300 Subject: CI: enable address sanitizer when building with Clang As I cannot run the test suite with Valgrind in Github runners, this should still catch some memory bugs during test suite runs. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d42585a..aeecd9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,9 @@ jobs: strategy: matrix: os: [ubuntu-20.04, ubuntu-22.04] - compiler: ['CC=gcc CXX=g++', 'CC=clang CXX=clang++'] + # Enable Adress Sanitizer only on Clang. + # This will improve the test suite quality, even without Valgrind. + compiler: ['CC=gcc CXX=g++', '--disable-malloc-replacement CC=clang CXX=clang++ CFLAGS="-fsanitize=address -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=address -fno-omit-frame-pointer"'] interface: [ncurses, gtk] # NOTE: The virtual environments already contain both GCC and Clang -- cgit v1.2.3