forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add Support for Valkey 6.2, 7.0 and 7.2 (valkey-io#1711)
- Transitioned the engine building process to be sourced from the Valkey repository. - Introduced compatibility with the following engine versions: Valkey and Redis 6.2 Valkey and Redis 7.0 Valkey and Redis 7.2 (first stable release of Valkey 7.2.5.) - Engine Installation Checks: Added check that the engine is installed with the requested version. - Moved the engine version matrix to a JSON file for better management and readability. - Fixed Object Encoding tests to expect quicklist on versions < 7.2 instead of 7.0 - Fixed C# and Java version parsing from redis-server -v output to support also Valkey's output - Updated the README file with the supported versions & engine typ
- Loading branch information
Showing
20 changed files
with
279 additions
and
100 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"type": "valkey", | ||
"version": "7.2.5" | ||
}, | ||
{ | ||
"type": "valkey", | ||
"version": "redis-7.0.15" | ||
}, | ||
{ | ||
"type": "valkey", | ||
"version": "redis-6.2.14" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Install Valkey | ||
|
||
inputs: | ||
engine-version: | ||
description: "Engine version to install" | ||
required: true | ||
type: string | ||
target: | ||
description: "Specified target toolchain, ex. x86_64-unknown-linux-gnu" | ||
type: string | ||
required: true | ||
options: | ||
- x86_64-unknown-linux-gnu | ||
- aarch64-unknown-linux-gnu | ||
- x86_64-apple-darwin | ||
- aarch64-apple-darwin | ||
- aarch64-unknown-linux-musl | ||
- x86_64-unknown-linux-musl | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
VALKEY_MIN_VERSION: "7.2.5" | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Cache Valkey | ||
# TODO: remove the musl ARM64 limitation when https://github.com/actions/runner/issues/801 is resolved | ||
if: ${{ inputs.target != 'aarch64-unknown-linux-musl' }} | ||
uses: actions/cache@v4 | ||
id: cache-valkey | ||
with: | ||
path: | | ||
~/valkey | ||
key: valkey-${{ inputs.engine-version }}-${{ inputs.target }} | ||
|
||
- name: Build Valkey | ||
if: ${{ steps.cache-valkey.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: | | ||
echo "Building valkey ${{ inputs.engine-version }}" | ||
cd ~ | ||
rm -rf valkey | ||
git clone https://github.com/valkey-io/valkey.git | ||
cd valkey | ||
git checkout ${{ inputs.engine-version }} | ||
make BUILD_TLS=yes | ||
- name: Install Valkey | ||
shell: bash | ||
run: | | ||
cd ~/valkey | ||
if command -v sudo &> /dev/null | ||
then | ||
echo "sudo command exists" | ||
sudo make install | ||
else | ||
echo "sudo command does not exist" | ||
make install | ||
fi | ||
echo 'export PATH=/usr/local/bin:$PATH' >>~/.bash_profile | ||
- name: Verify Valkey installation and symlinks | ||
shell: bash | ||
run: | | ||
# In Valkey releases, the engine is built with symlinks from valkey-server and valkey-cli | ||
# to redis-server and redis-cli. This step ensures that the engine is properly installed | ||
# with the expected version and that Valkey symlinks are correctly created. | ||
EXPECTED_VERSION=`echo ${{ inputs.engine-version }} | sed -e "s/^redis-//"` | ||
INSTALLED_VER=$(redis-server -v) | ||
if [[ $INSTALLED_VER != *"${EXPECTED_VERSION}"* ]]; then | ||
echo "Wrong version has been installed. Expected: $EXPECTED_VERSION, Installed: $INSTALLED_VER" | ||
exit 1 | ||
else | ||
echo "Successfully installed the server: $INSTALLED_VER" | ||
fi | ||
Oops, something went wrong.