Skip to content

Refactor the parsing of a key in a command #116

Refactor the parsing of a key in a command

Refactor the parsing of a key in a command #116

Workflow file for this run

name: Build and test
on: [push, pull_request]
jobs:
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y valgrind libevent-dev cmake libssl-dev
# TODO: Test against Redis and KeyDB in addition to Valkey
- name: Install Valkey
run: |
git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
cd valkey && sudo BUILD_TLS=yes make install
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make
- name: Build using makefile
run: USE_SSL=1 TEST_ASYNC=1 make
- name: Run tests
working-directory: tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
run: ./test.sh
# - name: Run tests under valgrind
# env:
# SKIPS_AS_FAILS: 1
# TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
# run: $GITHUB_WORKSPACE/test.sh
centos7:
name: CentOS 7
runs-on: ubuntu-latest
container: centos:7
steps:
# CentOS 7 uses an older glibc, only v3 of actions/checkout can be used.
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install dependencies
run: |
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum -y --enablerepo=remi install redis
yum -y install git gcc gcc-c++ make openssl openssl-devel cmake3 valgrind libevent-devel
- name: Install Valkey
run: |
git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake3 .. && make
- name: Build using Makefile
run: USE_SSL=1 TEST_ASYNC=1 make
- name: Run tests
working-directory: tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
run: ./test.sh
- name: Run tests under valgrind
working-directory: tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
run: ./test.sh
centos8:
name: RockyLinux 8
runs-on: ubuntu-latest
container: rockylinux:8
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install dependencies
run: |
dnf -y upgrade --refresh
dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf -y module install redis:remi-6.0
dnf -y group install "Development Tools"
dnf -y install openssl-devel cmake valgrind libevent-devel
- name: Install Valkey
run: |
git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make
- name: Build using Makefile
run: USE_SSL=1 TEST_ASYNC=1 make
- name: Run tests
working-directory: tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
run: ./test.sh
- name: Run tests under valgrind
working-directory: tests
env:
SKIPS_AS_FAILS: 1
TEST_SSL: 1
TEST_PREFIX: valgrind --error-exitcode=99 --track-origins=yes --leak-check=full
run: ./test.sh
freebsd:
runs-on: ubuntu-latest
name: FreeBSD
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build in FreeBSD
uses: vmactions/freebsd-vm@f8be330398166d1eb0601f01353839d4052367b2 # v1.0.7
with:
prepare: pkg install -y gmake cmake
run: |
gmake
mkdir build && cd build && cmake .. && gmake
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install dependencies
run: |
brew install openssl valkey
- name: Build library
run: USE_SSL=1 make
- name: Run tests
working-directory: tests
env:
TEST_SSL: 1
run: ./test.sh
windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install dependencies
run: |
choco install -y ninja memurai-developer
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Build library
run: |
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja -v
- name: Run tests
working-directory: ${{ github.workspace }}/build
run: .\tests\client_test.exe
- name: Install Cygwin Action
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # v4
with:
packages: make git gcc-core
- name: Build in cygwin
env:
HIREDIS_PATH: ${{ github.workspace }}
run: |
make clean && make