Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CMake

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
redis: [4, 5, 6]
include:
- os: macos-latest
gcc: 4.8
runs-on: ${{ matrix.os }}


steps:
- uses: actions/checkout@v3
with:
submodules: true

- if: ${{ matrix.gcc }}
run: export CXX="g++-${{ matrix.gcc }}" CC="gcc-${{ matrix.gcc }}"

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTS=true -DBUILD_EXAMPLES=true -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
with:
redis-version: ${{ matrix.redis }}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: GTEST_COLOR=1 ctest -VV -C ${{env.BUILD_TYPE}}