Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI updates #95

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
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
58 changes: 2 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,6 @@ 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
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

almalinux8:
name: AlmaLinux 8
runs-on: ubuntu-latest
Expand All @@ -50,7 +12,7 @@ jobs:
- name: Install dependencies
run: |
dnf -y install epel-release
dnf -y install gcc make cmake3 openssl openssl-devel libevent-devel valgrind procps-ng valkey
dnf -y install gcc make cmake3 openssl openssl-devel libevent-devel procps-ng valkey

- name: Build using cmake
env:
Expand All @@ -67,14 +29,6 @@ jobs:
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
Expand All @@ -88,7 +42,7 @@ jobs:
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
dnf -y install openssl-devel cmake libevent-devel

- name: Install Valkey
run: |
Expand All @@ -110,14 +64,6 @@ jobs:
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
Expand Down
39 changes: 37 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
with:
clang-format-version: '18'

ubuntu:
name: ${{ matrix.cmake-build-type }} build [${{ matrix.compiler }}, cmake-${{ matrix.cmake-version }} sanitizer="${{ matrix.sanitizer }}"]
ubuntu-cmake:
name: Build with CMake [${{ matrix.cmake-build-type }}, ${{ matrix.compiler }}, cmake-${{ matrix.cmake-version }}, sanitizer="${{ matrix.sanitizer }}"]
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
Expand All @@ -28,6 +28,11 @@ jobs:
sanitizer: ["", thread, undefined, leak, address]
runner: [ubuntu-24.04]
include:
- compiler: clang-18
cmake-version: 3.29
cmake-build-type: Debug
sanitizer: ""
runner: ubuntu-24.04
- compiler: gcc-7
cmake-version: 3.13
cmake-build-type: Release
Expand Down Expand Up @@ -82,6 +87,36 @@ jobs:
working-directory: build
run: make stop

ubuntu-make:
name: Build with make
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev valgrind
version: 1.0
- 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
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

install:
name: Installation tests
runs-on: ubuntu-latest
Expand Down
Loading