diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79038f9..5dd8825 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,21 +29,17 @@ jobs: runner: [ubuntu-22.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: @@ -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