Skip to content

Commit

Permalink
Correcting CI to match current CMake changes
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Jun 25, 2024
1 parent cb3ef84 commit 4b5c6e7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake3 .. && make
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ jobs:
with:
packages: libevent-dev libuv1-dev libev-dev libglib2.0-dev ${{ matrix.compiler }}
version: 1.0
- name: Install hiredis
env:
VERSION: 1.2.0
- name: Install Valkey for non-cluster tests
run: |
curl -L https://github.com/redis/hiredis/archive/v${VERSION}.tar.gz | tar -xz
cmake -S hiredis-${VERSION} -B hiredis-build -DENABLE_SSL=ON
sudo make -C hiredis-build install
git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
with:
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/db-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:
fail-fast: false
matrix:
include:
- valkey-version: 7.2.5
- valkey-version: '7.2.5'
steps:
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev
version: 1.0
- name: Install Valkey for non-cluster tests
run: |
git clone --depth 1 --branch ${{ matrix.valkey-version }} https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Create build folder
run: cmake -E make_directory build
Expand Down Expand Up @@ -55,18 +59,19 @@ jobs:
fail-fast: false
matrix:
include:
- redis-version: 7.2.4
- redis-version: 7.0.15
- redis-version: 6.2.14
- redis-version: 6.0.20
- redis-version: 5.0.14
- redis-version: '7.2.4'
- redis-version: '7.0.15'
- redis-version: '6.2.14'
steps:
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev
version: 1.0

- name: Install Redis for non-cluster tests
run: |
git clone --depth 1 --branch ${{ matrix.redis-version }} https://github.com/redis/redis.git
cd redis && BUILD_TLS=yes make install
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Create build folder
Expand Down
6 changes: 6 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ if(LIBEVENT_LIBRARY)
endif()
target_link_libraries(client_test valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME client_test COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test.sh")
if(TEST_WITH_REDIS_VERSION)
set_property(TEST client_test PROPERTY ENVIRONMENT "VALKEY_SERVER=redis-server")
endif()
if(SSL_LIBRARY)
set_property(TEST client_test PROPERTY ENVIRONMENT "TEST_SSL=1")
endif()

# Add cluster tests

Expand Down

0 comments on commit 4b5c6e7

Please sign in to comment.