Skip to content

Commit

Permalink
Enable sanitizers in CI
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Sep 10, 2024
1 parent f3217e2 commit d03a53f
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,29 @@ jobs:
clang-format-version: '18'

ubuntu:
name: ${{ matrix.cmake-build-type }}-build [${{ matrix.compiler }}, cmake-${{ matrix.cmake-version }} sanitizer="${{ matrix.sanitizer }}"]
name: ${{ matrix.cmake-build-type }} build [${{ matrix.compiler }}, cmake-${{ matrix.cmake-version }} sanitizer="${{ matrix.sanitizer }}"]
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
compiler: [gcc-13, clang-18]
compiler: [gcc-14, clang-18]
cmake-version: [3.29]
cmake-build-type: [Release, RelWithDebInfo]
cmake-build-type: [Release]
sanitizer: ["", thread, undefined, leak, address]
runner: [ubuntu-22.04]
runner: [ubuntu-24.04]
include:
- compiler: gcc-7
cmake-version: 3.11
cmake-version: 3.13
cmake-build-type: Release
sanitizer: ""
runner: ubuntu-20.04
- compiler: clang-12
cmake-version: 3.11
cmake-version: 3.13
cmake-build-type: Release
sanitizer: ""
runner: ubuntu-20.04
steps:
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev libuv1-dev libev-dev libglib2.0-dev
version: 1.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup compiler
uses: aminya/setup-cpp@bfbfe9ca0b2c69a076f6513393d61fc478fb54f8 # v0.41.0
with:
Expand All @@ -52,18 +48,23 @@ jobs:
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
with:
cmake-version: ${{ matrix.cmake-version }}
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev libuv1-dev libev-dev libglib2.0-dev
version: 1.0
- name: Install Valkey for non-cluster tests
run: |
git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Create build folder
run: cmake -E make_directory build
- name: Generate makefiles
env:
CC: ${{ matrix.compiler }}
working-directory: build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_SSL=ON -DENABLE_IPV6_TESTS=ON -DUSE_SANITIZER=${{ matrix.sanitizer }} ..
run: |
if [ -n "${{ matrix.sanitizer }}" ]; then
export CFLAGS="-fno-omit-frame-pointer -fsanitize=${{ matrix.sanitizer }}"
fi
cmake -B build -S . -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DENABLE_SSL=ON -DENABLE_IPV6_TESTS=ON
- name: Build
working-directory: build
run: VERBOSE=1 make
Expand Down

0 comments on commit d03a53f

Please sign in to comment.