Skip to content

Commit

Permalink
Java: Add XCLAIM command (#392)
Browse files Browse the repository at this point in the history
* Python: add XPENDING command (valkey-io#1704)

* Python: add XPENDING command

* PR suggestions

* PR suggestions

* Java: Add Command GeoSearch & GeoSearchStore

* Java: Add Command GeoSearch & GeoSearchStore
---------

* trigger build

* Python: add RANDOMKEY command (valkey-io#1701)

* Python: add RANDOMKEY command

* Enable randomkey() test for that redis-rs is fixed

Signed-off-by: Andrew Carbonetto <[email protected]>

* NOP push

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]>

* Python: add FUNCTION FLUSH command (valkey-io#1700)

* Python: Added FUNCTION LOAD command

* Python: adds FUNCTION FLUSH command

* Updated CHANGELOG.md

* Resolved merge issues related to FlushMode

* Minor adjustments on command documentation

* Revert one minor change in example.

---------

Co-authored-by: Shoham Elias <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]>

* removing redis references

* Java: Handle panics and errors in the Java FFI layer (valkey-io#1601)

* Restructure Java FFI layer to handle errors properly

* Fix failing tests

* Address clippy lints

* Add tests for error and panic handling

* Add missing errors module

* Fix clippy lint

* Fix FFI tests

* Apply Spotless

* Fix some minor issue I forgot about

* Add some comments

* Apply Spotless

* Make handle_panics return Option<T> instead

* Java: Add SSCAN and ZSCAN commands (valkey-io#1705)

* Java: Add `SSCAN` command (#394)

* Add ScanOptions base class for scan-family options.
* Expose the cursor as a String to support unsigned 64-bit cursor values.

Co-authored-by: James Duong <[email protected]>

* Java: Add `ZSCAN` command (#397)

---------

Co-authored-by: James Duong <[email protected]>

* WIP TODO: support transactions, docs, and more IT

* Added more tests

* Added tests and javadocs

* Improved examples and tests

* Correct use of SScanOptions instead of ScanOptions for SScan

* Remove plumbing for SCAN command

* Sleep after sadd() calls before sscan() calls

Due to eventual consistency

* Change sscan cursor to be a String

Also fix bug in SharedCommandTests

* WIP with todos

# Conflicts:
#	glide-core/src/protobuf/redis_request.proto
#	glide-core/src/request_type.rs
#	java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java

* Add ZScan to TransactionTestUtilities

* Spotless cleanup

* Test fixes

* Cleanup test code

* Apply IntelliJ suggestions
* Use String.valueOf() instead of concatenating empty string

* Added better error info for set comparison failures

* More logging for test failures

* Add sleeps after zadd() calls

To help make sure data is consistent without WAIT

* Longer sleeps

* Reduce wait time

* Experiment with unsigned 64-bit cursors

* Fix rebase error

* WIP TODO: support transactions, docs, and more IT

* Added more tests

* Added tests and javadocs

* Improved examples and tests

* Apply PR comments

* Fix method ordering in BaseTransaction
* Fix broken line breaks within code tags in ScanOptions
* More thoroughly test results in SharedCommandTests

* Add better logging for set comparisons

* Spotless

* Sleep after sadd() calls before sscan() calls

Due to eventual consistency

* Change sscan cursor to be a String

Also fix bug in SharedCommandTests

* Update java/integTest/src/test/java/glide/SharedCommandTests.java

Co-authored-by: Guian Gumpac <[email protected]>

* Update java/integTest/src/test/java/glide/SharedCommandTests.java

Co-authored-by: Guian Gumpac <[email protected]>

* Fix rebase conflicts

* Fix another rebase conflict

* Spotless

* Update java/client/src/main/java/glide/api/models/BaseTransaction.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Update java/client/src/main/java/glide/api/models/BaseTransaction.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Update java/client/src/main/java/glide/api/models/BaseTransaction.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Update java/client/src/main/java/glide/api/models/BaseTransaction.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Correctly use constants in TransactionTests

* Rename ScanOptions to BaseScanOptions

* Doc PR fixes

* Treat end of cursor as failure

* Spotless

* Fixes

* Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Update java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java

Co-authored-by: Andrew Carbonetto <[email protected]>

* Minor doc changes

---------

Co-authored-by: Guian Gumpac <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]>

* 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

* Python: add FUNCTION DELETE command (valkey-io#1714)

* Python: adds FUNCTION DELETE command

Co-authored-by: Shoham Elias <[email protected]>

* Python: add `SSCAN` command (valkey-io#1709)

* Added sscan command to python

* Fixed formatting

* Fixed CI failures

* Lint

* Improved example and test

* Changes based on sscan java PR

* Added to changelog

* Addressed PR comments

* Added string casting

* Java: Add HSCAN command (valkey-io#1706)

* Java: Add `SSCAN` command (#394)

* Add ScanOptions base class for scan-family options.
* Expose the cursor as a String to support unsigned 64-bit cursor values.

Co-authored-by: James Duong <[email protected]>

* Java: Add `ZSCAN` command (#397)

---------

Co-authored-by: James Duong <[email protected]>

* WIP TODO: support transactions, docs, and more IT

* Added more tests

* Added tests and javadocs

* Improved examples and tests

* Correct use of SScanOptions instead of ScanOptions for SScan

* Remove plumbing for SCAN command

* Sleep after sadd() calls before sscan() calls

Due to eventual consistency

* Change sscan cursor to be a String

Also fix bug in SharedCommandTests

* WIP with todos

# Conflicts:
#	glide-core/src/protobuf/redis_request.proto
#	glide-core/src/request_type.rs
#	java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java

* Add ZScan to TransactionTestUtilities

* Spotless cleanup

* Test fixes

* Cleanup test code

* Apply IntelliJ suggestions
* Use String.valueOf() instead of concatenating empty string

* Added better error info for set comparison failures

* More logging for test failures

* Add sleeps after zadd() calls

To help make sure data is consistent without WAIT

* Longer sleeps

* Reduce wait time

* Experiment with unsigned 64-bit cursors

* Fix rebase error

* WIP TODO: support transactions, docs, and more IT

* Added more tests

* Added tests and javadocs

* Improved examples and tests

* Sleep after sadd() calls before sscan() calls

Due to eventual consistency

* Change sscan cursor to be a String

Also fix bug in SharedCommandTests

* Fix rebase conflicts

* Fix another rebase conflict

* Spotless

* HScan

* Flakey test

* Add HScan transaction unit test

* Rename ScanOptions to BaseScanOptions

* Fix merge issues

* Fix module-info ordering

* Tidy up docs

* PR comments

Fix up merge duplication and use HScanOptions constants.

---------

Co-authored-by: Guian Gumpac <[email protected]>

* Python: add LCS command (valkey-io#1716)

* python: add LCS command (#406)

* python: add LCS command

* update CHANGELOG

* add more comment explaning the functionality of the command

* address comments on the docs

* Java: Changed handling of large requests to transfer them as leaked pointers (valkey-io#1708)

* Restructure Java FFI layer to handle errors properly

* Address clippy lints

* Add tests for error and panic handling

* Fix FFI tests

* Apply Spotless

* Fix some minor issue I forgot about

* Add API to create the leaked bytes vec

* Bridge the MAX_REQUEST_ARGS_LENGTH constant from Rust to Java

* Fix warnings in Rust

* Update Java client to utilize the pointer with large argument sizes

* Update createLeakedBytesVec to handle panics

* spotless

* Add docs and run Rust linters

* Add large value tests

* Fix transactions and add transaction tests

* dummy commit for CI

* Revert "dummy commit for CI"

This reverts commit 3ed1937.

* Fix JDK11 build issue

Due to using a JDK17 function

* Fix another JDK11 issue

* Fix merge issues.

* Remove unneccesary mut prefix

* Clarify the MAX_REQUEST_ARGS_LENGTH_IN_BYTES constant

* Fix merge issue

---------

Co-authored-by: Jonathan Louie <[email protected]>

* Create initial workflow for publishing to Maven Central (valkey-io#1600)

* WIP Create initial workflow for publishing to Maven Central (valkey-io#1594)

* WIP Create initial workflow for publishing to Maven Central

* Add classifier to workflow

* Remove condition to allow all jobs to run

* Try to fix Gradle workflow errors

* Re-enable aws related options

* Add missing property

* Revert "Add missing property"

This reverts commit 6cc5fba.

* Add AWS_ACTIONS option

* Sign JAR file

* Fix signing issue

* Try to fix issue with generating secring.gpg file

* Fix path to secring.gpg

* Try to fix secring.gpg retrieval issue

* Remove base64 decode

* Try to fix multi-line issue with GPG key secret

* Go back to echo approach

* Decode base64 properly this time

* Use GPG_KEY_ID

* Surround password in quotes

* Publish JAR to local Maven and upload

* Update examples build.gradle

* Sign publishToMavenLocal build

* Update version of Java JAR

* Properly fetch src_folder variable contents

* Reorganize JAR contents

* Update path of uploaded JAR

* Update artifact ID

* Add missing comma

* Replace placeholders in build.gradle

* Update examples build.gradle

* Remove test runs from java.yml workflow

* Add debugging info to workflow

* Adjust debug info

* Readd placeholder text in build.gradle

* Add more debug info

* Change how the JAR is copied

* Add configurations for ARM linux and x86 macos

* Prevent output artifacts from being swallowed

* Update build matrix to use proper RUNNERs

* Try to use self-hosted runner for ARM Linux builds

* Delete gradle-cd workflow

* Add id-token permissions

* Add step to setup self-hosted runner access

* Add CONTAINER property to java.yml workflow

* Remove install Redis step from java.yml workflow

* Remove test-benchmark step from java.yml workflow

* Fix issue with Java classifier

* Update java.yml to use classifier

* Bump version and add archiveClassifier

* Change groupId to valkey-client

* Update example and base archive name

* Update workflow

* Rename to glide-for-redis

* Extracting Java Deployment to a different workflow

Workflow will only trigger when a tag is pushed to the repo

Version is extracted from the tag and replaced in the build.grade files

reverted changes of java.yml file

* trying to make the workflow to build

* testing action to prepare build

* forcing new action to trigger

* Revert "forcing new action to trigger"

This reverts commit d097a1f.

* Revert "testing action to prepare build"

This reverts commit 8864434.

* Revert "trying to make the workflow to build"

This reverts commit 143818a.

* Revert "Extracting Java Deployment to a different workflow"

This reverts commit faff846.

* Revert "Revert "Extracting Java Deployment to a different workflow""

This reverts commit 11f8470.

* fixing workflow

* fixed path for the local maven

* removing bundle from the tests
fix to the JAVA CI not finding tests dependencies

* fix java workflow

* removing classifier from the pom

* fixing concurrency

* Remove publishToMavenLocal line in examples build.gradle

* fix examples

* cleaning up java.yml

* testing removing test dependency

* adding skip signing

* Revert "adding skip signing"

This reverts commit e448788.

* Revert "testing removing test dependency"

This reverts commit d0e06b7.

* Revert "cleaning up java.yml"

This reverts commit e7394d7.

* removing dependency of singing in the local build

* java.yml clean up

* removing steps from java.yml

* added comments

* removed step on sed the examples and removed if always from the upload artifacts

---------

Co-authored-by: affonsov <[email protected]>
Co-authored-by: affonsov <[email protected]>

* valkey-io#1715: fix flakey test in xpending (valkey-io#1717)

valkey-io#1715: fix flacky test in xpending

Signed-off-by: Andrew Carbonetto <[email protected]>

* Java: Adding command WAIT (valkey-io#1707)

* Java: Adding command WAIT

Java: Adding command WAIT

* addressing comments

* fixing timeout_idx in get_timeout_from_cmd_args call

* update timeout check

* fixing rust test

* adding special case for WAIT

* rust linter

* remove special case in get_timeout_from_cmd_args

* adding description for timeout 0

* rust linter

* updating timeout test

* changing transaction documentation

---------

Co-authored-by: TJ Zhang <[email protected]>

* support smismember with GlideString (valkey-io#1694)

* Support GlideString for sdiff commands (valkey-io#1722)

Co-authored-by: Yulazari <[email protected]>

* Updated attribution files

* support hset, hget, lindex, linsert, blmove, incr, hlen and lmove wit… (valkey-io#1667)

* Python: move the commands return value to bytes (valkey-io#1617)

* In the case of Simple String, Bulk String, or Verbatim String commands, Bytes will be returned instead of strings.

---------

Co-authored-by: GilboaAWS <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Adar Ovadia <[email protected]>
Co-authored-by: Shoham Elias <[email protected]>
Co-authored-by: Shoham Elias <[email protected]>

* Java: Add XGROUP SETID command (valkey-io#1720)

* Initial implementation of XGroupSetId

* Unit tests

* Add integration tests

* PR feedback

* Address PR comments

doc updates

* Add 7.0.0 transaction integration test

* Java: update README directory to include Java's README.md (valkey-io#1734)

add java part to readme directory

* Java: Add XCLAIM command

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add unit tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add transaction tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update IT tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update IT tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add UT tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add transaction tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix transaction tests

Signed-off-by: Andrew Carbonetto <[email protected]>

* Update XCLAIM with options; remove LASTID

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add a couple more test cases

Signed-off-by: Andrew Carbonetto <[email protected]>

* clean up

Signed-off-by: Andrew Carbonetto <[email protected]>

* Clean rust

Signed-off-by: Andrew Carbonetto <[email protected]>

* Add examples

Signed-off-by: Andrew Carbonetto <[email protected]>

* Move to 2D string array in response

Signed-off-by: Andrew Carbonetto <[email protected]>

* Fix Transaction tests; update examples

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Co-authored-by: Aaron <[email protected]>
Co-authored-by: tjzhang-BQ <[email protected]>
Co-authored-by: TJ Zhang <[email protected]>
Co-authored-by: Yi-Pin Chen <[email protected]>
Co-authored-by: Shoham Elias <[email protected]>
Co-authored-by: jonathanl-bq <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: Guian Gumpac <[email protected]>
Co-authored-by: Bar Shaul <[email protected]>
Co-authored-by: James Duong <[email protected]>
Co-authored-by: James Xin <[email protected]>
Co-authored-by: Jonathan Louie <[email protected]>
Co-authored-by: affonsov <[email protected]>
Co-authored-by: affonsov <[email protected]>
Co-authored-by: Alon Arenberg <[email protected]>
Co-authored-by: yulazariy <[email protected]>
Co-authored-by: Yulazari <[email protected]>
Co-authored-by: ort-bot <[email protected]>
Co-authored-by: adarovadya <[email protected]>
Co-authored-by: GilboaAWS <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Adar Ovadia <[email protected]>
Co-authored-by: Shoham Elias <[email protected]>
Co-authored-by: Chloe Yip <[email protected]>
  • Loading branch information
25 people authored Jun 30, 2024
1 parent 187b2ba commit 147b497
Show file tree
Hide file tree
Showing 90 changed files with 48,724 additions and 1,363 deletions.
File renamed without changes.
14 changes: 14 additions & 0 deletions .github/json_matrices/engine-matrix.json
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"
}
]
5 changes: 5 additions & 0 deletions .github/workflows/build-node-wrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inputs:
description: "Specified target for rust toolchain, ex. x86_64-apple-darwin"
type: string
required: true
engine-version:
description: "Engine version to install"
required: true
type: string
publish:
description: "Enable building the wrapper in release mode"
required: false
Expand Down Expand Up @@ -56,6 +60,7 @@ runs:
os: ${{ inputs.os }}
target: ${{ inputs.target }}
github-token: ${{ inputs.github-token }}
engine-version: ${{ inputs.engine-version }}

- name: Create package.json file
uses: ./.github/workflows/node-create-package-file
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-python-wrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
description: "Specified target for rust toolchain, ex. x86_64-apple-darwin"
type: string
required: true
engine-version:
description: "Engine version to install"
required: true
type: string
publish:
description: "Enable building the wrapper in release mode"
required: false
Expand All @@ -34,6 +38,7 @@ runs:
os: ${{ inputs.os }}
target: ${{ inputs.target }}
github-token: ${{ inputs.github-token }}
engine-version: ${{ inputs.engine-version }}

- name: Install Python software dependencies
shell: bash
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ on:
- submodules/**
- .github/workflows/csharp.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-redis/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
pull_request:
paths:
- csharp/**
- glide-core/src/**
- submodules/**
- .github/workflows/csharp.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-redis/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml

permissions:
contents: read
Expand All @@ -31,14 +31,26 @@ concurrency:
cancel-in-progress: true

jobs:
load-engine-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.load-engine-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Load the engine matrix
id: load-engine-matrix
shell: bash
run: echo "matrix=$(jq -c . < .github/json_matrices/engine-matrix.json)" >> $GITHUB_OUTPUT

run-tests:
needs: load-engine-matrix
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
redis:
- 6.2.14
- 7.2.3
engine: ${{ fromJson(needs.load-engine-matrix.outputs.matrix) }}
dotnet:
- '6.0'
- '8.0'
Expand All @@ -61,13 +73,6 @@ jobs:
with:
submodules: recursive

- name: Install redis
# TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781
if: ${{ matrix.host.OS == 'ubuntu' }}
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}

- name: Set up dotnet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v4
with:
Expand All @@ -79,6 +84,7 @@ jobs:
os: ${{ matrix.host.OS }}
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}
engine-version: ${{ matrix.engine.version }}

- name: Format
working-directory: ./csharp
Expand Down
41 changes: 25 additions & 16 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,41 @@ on:
- submodules/**
- go/**
- .github/workflows/go.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
pull_request:
paths:
- glide-core/src/**
- submodules/**
- go/**
- .github/workflows/go.yml

- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
concurrency:
group: go-${{ github.head_ref || github.ref }}
cancel-in-progress: true


jobs:
load-engine-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.load-engine-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Load the engine matrix
id: load-engine-matrix
shell: bash
run: echo "matrix=$(jq -c . < .github/json_matrices/engine-matrix.json)" >> $GITHUB_OUTPUT

build-and-test-go-client:
needs: load-engine-matrix
timeout-minutes: 35
strategy:
# Run all jobs
Expand All @@ -30,9 +51,7 @@ jobs:
go:
- '1.18.10'
- '1.22.0'
redis:
- 6.2.14
- 7.2.3
engine: ${{ fromJson(needs.load-engine-matrix.outputs.matrix) }}
host:
- {
OS: ubuntu,
Expand Down Expand Up @@ -64,13 +83,7 @@ jobs:
os: ${{ matrix.host.OS }}
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install redis
# TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}
engine-version: ${{ matrix.engine.version }}

- name: Install tools for Go ${{ matrix.go }}
working-directory: ./go
Expand Down Expand Up @@ -127,11 +140,7 @@ jobs:
os: "amazon-linux"
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a symbolic Link for redis6 binaries
run: |
ln -s /usr/bin/redis6-server /usr/bin/redis-server
ln -s /usr/bin/redis6-cli /usr/bin/redis-cli
engine-version: "7.2.5"

- name: Install Go
run: |
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ inputs:
- aarch64-apple-darwin
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
engine-version:
description: "Engine version to install"
required: true
type: string

github-token:
description: "GITHUB_TOKEN, GitHub App installation access token"
required: true
Expand All @@ -36,7 +41,7 @@ runs:
run: |
brew update
brew upgrade || true
brew install git gcc pkgconfig openssl redis coreutils
brew install git gcc pkgconfig openssl coreutils
- name: Install software dependencies for Ubuntu GNU
shell: bash
Expand All @@ -52,17 +57,23 @@ runs:
apk update
wget -O - https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
apk add protobuf-dev musl-dev make gcc redis envsubst
apk add protobuf-dev musl-dev make gcc envsubst openssl libressl-dev
- name: Install software dependencies for Amazon-Linux
shell: bash
if: "${{ inputs.os == 'amazon-linux' }}"
run: |
yum install -y gcc pkgconfig openssl openssl-devel which curl redis6 gettext --allowerasing
yum install -y gcc pkgconfig openssl openssl-devel which curl gettext --allowerasing
- name: Install Rust toolchain and protoc
if: "${{ !contains(inputs.target, 'musl') }}"
uses: ./.github/workflows/install-rust-and-protoc
with:
target: ${{ inputs.target }}
github-token: ${{ inputs.github-token }}

- name: Install Valkey
uses: ./.github/workflows/install-valkey
with:
engine-version: ${{ inputs.engine-version }}
target: ${{ inputs.target }}
78 changes: 78 additions & 0 deletions .github/workflows/install-valkey/action.yml
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
Loading

0 comments on commit 147b497

Please sign in to comment.