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