From f9c0570e34862a6f4cc9a4c2b721fb77a964bcaa Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Thu, 20 Apr 2023 23:01:20 +0200 Subject: [PATCH] Run tests under various sanitizers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is in preparation for the next commit which will fix a very long standing bug… --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 138b1ea..ed54ba5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,3 +65,34 @@ jobs: #fail_ci_if_error: true verbose: true gcov: true + + sanitizers: + name: Test with clang sanitizers + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + compiler: ['clang'] + # These are the various sanitizers from https://github.com/google/sanitizers: + cflags: + - '-fsanitize=address -O1 -fno-omit-frame-pointer -g' + - '-fsanitize=undefined -fsanitize=memory -fsanitize-memory-track-origins -fPIE -pie -fno-omit-frame-pointer -g -O2' + - '-fsanitize=undefined' + + fail-fast: false + env: + CC: ${{ matrix.compiler }} + CFLAGs: ${{ matrix.cflags }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build the code + run: make + + - name: Install dependencies + run: sudo apt-get install -yy shelltestrunner + + - name: Run tests + run: make check