Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
0ba6f6a
Initial commit of Windows CI for Java
jduo Oct 20, 2025
10f283c
Verify build tools the same way as in C#
jduo Oct 20, 2025
930a3fe
Make Windows requirements for Java only affect Java runs
jduo Oct 20, 2025
5714bf1
Syntax errors in Go workflows
jduo Oct 20, 2025
80621ff
Correctly disable windows when build is set to always but Windows isn…
jduo Oct 21, 2025
2534d32
Debugging windows CI failures
jduo Oct 21, 2025
6cdbff5
Fixing distro name
jduo Oct 21, 2025
3114f40
Attempt to fix WSL
jduo Oct 21, 2025
ad87a86
Setup WSL2 using vampire/setup-wsl action
jduo Oct 21, 2025
2a87b14
Clean-up vampire usage
jduo Oct 21, 2025
8bbf2c3
Use the shell wrapper after running vampire
jduo Oct 21, 2025
340843c
Rework tracking of IP for tests
jduo Oct 21, 2025
041f947
Remove apt-update when installing the engine and use newer vampire
jduo Oct 21, 2025
004f0e6
Fix syntax error when getting WSL IP
jduo Oct 21, 2025
78fd3c7
Use vampire update to fix missing repo errors
jduo Oct 21, 2025
c191a1a
Speed up valkey build
jduo Oct 21, 2025
8626647
Fix missing python3 on Windows
jduo Oct 21, 2025
2c5a2e6
Parallelize the cargo build within gradle
jduo Oct 21, 2025
8cb58e2
Fix up cargo parallelization
jduo Oct 21, 2025
33f5292
Handle the Windows native binaries in NativeUtils and gradle
jduo Oct 21, 2025
7f97a58
Fix cache hit on valkey server
jduo Oct 21, 2025
ded3f27
Fix semgrep warning
jduo Oct 21, 2025
ade6fe2
Run prettier
jduo Oct 21, 2025
e004d4f
Fix conflicting directory name when there's a cache hit on valkey server
jduo Oct 21, 2025
f1bb2ee
Fix file conflict when getting valkey server from cache
jduo Oct 21, 2025
56d1015
Cache rust, ziglang, protoc
jduo Oct 21, 2025
47ee40b
Use valkey server names when caching
jduo Oct 21, 2025
f5bb5dc
Handle redis and valkey server binary names
jduo Oct 21, 2025
3917ece
Revert caching of build tools
jduo Oct 21, 2025
f8a6c06
Fix unrelated cbindgen issue
jduo Oct 21, 2025
1e0c4e9
Fix cache miss on valkey-server
jduo Oct 21, 2025
3c8948b
Fix for valkey server cache miss
jduo Oct 21, 2025
d677686
Set variables using WSLENV
jduo Oct 21, 2025
994dff8
Fix cbindgen issue
jduo Oct 21, 2025
a29da0f
Propagate more properties to WSL
jduo Oct 21, 2025
38a407f
Turn off cargo parallelization to see if it helps Go
jduo Oct 21, 2025
cbe3ec6
Install python3 on Windows
jduo Oct 22, 2025
d18b750
Create batch file wrappers for valkey server commands
jduo Oct 22, 2025
0668dcc
Change cluster_manager.py to use where on Windows in addition to which
jduo Oct 22, 2025
c35be73
Use the full path when invokign subprocess in cluster_manager.py
jduo Oct 22, 2025
7dda068
Handle Windows specifics in gradle and cluster_manager.py
jduo Oct 22, 2025
518f64e
Change gradle to make the host for integration tests customizable
jduo Oct 22, 2025
546f3cf
Change cluster integration tests to not hardcode python3
jduo Oct 22, 2025
ffd4084
Fix host parameterization for integration tests
jduo Oct 22, 2025
5c95326
Fix bug in cluster_manager.py where the host parameter was unsupported
jduo Oct 22, 2025
5e7d9d1
Normalize log file path
jduo Oct 22, 2025
6afe08a
spotless
jduo Oct 22, 2025
230cd49
Normalize paths in wait_for_message
jduo Oct 22, 2025
f4707f2
Call cluster_manager.py using wsl
jduo Oct 22, 2025
8814e63
Remove normalization
jduo Oct 22, 2025
350481d
Increase the timeout for cluster initialization
jduo Oct 22, 2025
aba6554
Debugging cluster_manager.py issues on WSL
jduo Oct 22, 2025
9b86a57
Fix python syntax error
jduo Oct 22, 2025
f96e5f6
Python indentation fix
jduo Oct 22, 2025
23a076f
Speed up cluster_manager debugging
jduo Oct 22, 2025
db17982
More logging info
jduo Oct 22, 2025
9f3ec21
Fix linter issues
jduo Oct 22, 2025
c7a8359
Bind to 0.0.0.0 for cluster communication to work in containerized en…
jduo Oct 22, 2025
df5ee90
Try turning off replication
jduo Oct 22, 2025
933eece
Enable one replica
jduo Oct 23, 2025
7adac4d
Add cluster bus diagnostics for WSL
jduo Oct 23, 2025
bc49089
Handle slower replica syncing on WSL
jduo Oct 23, 2025
01ce42c
Revert to 3 replicas as before
jduo Oct 23, 2025
1eb42b8
Use a more lightweight check for replica verification
jduo Oct 23, 2025
8562f93
Add specialization for replica detection for WSL environments
jduo Oct 23, 2025
37de18c
Linting fix
jduo Oct 23, 2025
2bd3f0c
Linter fixes
jduo Oct 23, 2025
6ab826e
Fix cluster_manager.py argument order
jduo Oct 23, 2025
be4a11c
Spotless
jduo Oct 23, 2025
9421e66
Replica debugging
jduo Oct 24, 2025
28e2459
Debugging replica issues
jduo Oct 24, 2025
83f4d27
Move debugging sooner
jduo Oct 24, 2025
879af3a
Increase workflow timeout on Windows specifically
jduo Oct 24, 2025
fe8b8c7
Use the system temp directory for OpenTelemetryTests
jduo Oct 24, 2025
161f3d1
More diagnostics for replica issue
jduo Oct 24, 2025
170b7ad
spotless
jduo Oct 24, 2025
fd33dd1
Fix OpenTelemetry test issue with filename
jduo Oct 24, 2025
28ae93e
Track if the native lib is already loaded
jduo Oct 24, 2025
ffa9c38
spotless
jduo Oct 24, 2025
48aac9b
More
jduo Oct 24, 2025
5e6e851
Run the build after optimizing WSL
jduo Oct 24, 2025
21a611e
Use only 1 replica to reduce resource usage
jduo Oct 24, 2025
ee8e470
More diagnostics
jduo Oct 24, 2025
da0dc06
Fix YAML syntax error
jduo Oct 24, 2025
7022ee4
Remove faulty valkey server check in optimize WSL step
jduo Oct 24, 2025
77805e9
Add more diagnostics for replica issue
jduo Oct 25, 2025
c6863c9
Various test fixes
jduo Oct 25, 2025
ac0ad29
Optimize WSL
jduo Oct 25, 2025
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
10 changes: 10 additions & 0 deletions .github/json_matrices/build-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,15 @@
"IMAGE": "amazonlinux:latest",
"PACKAGE_MANAGERS": [],
"languages": ["python", "node", "java", "go"]
},
{
"OS": "windows",
"NAMED_OS": "windows",
"RUNNER": "windows-latest",
"ARCH": "x64",
"TARGET": "x86_64-pc-windows-msvc",
"PACKAGE_MANAGERS": ["maven"],
"languages": ["java"],
"run": "always"
}
]
4 changes: 2 additions & 2 deletions .github/workflows/create-test-matrices/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ runs:
echo 'Select runners (VMs) to run tests on'

if [[ "$EVENT_NAME" == "pull_request" || "$EVENT_NAME" == "push" || "$RUN_FULL_MATRIX" == "false" ]]; then
echo 'Getting "always run" runners'
BASE_MATRIX=$(jq -c '[.[] | select(.run == "always")]' < .github/json_matrices/build-matrix.json)
echo 'Getting "always run" runners for this language'
BASE_MATRIX=$(jq --arg lang "$LANGUAGE_NAME" -c '[.[] | select(.run == "always" and .languages? and any(.languages[] == $lang; .) and '"$CONDITION"')]' < .github/json_matrices/build-matrix.json)
else
echo 'Getting full matrix for language excluding macOS'
BASE_MATRIX=$(jq --arg lang "$LANGUAGE_NAME" -c '[.[] | select(.languages? and any(.languages[] == $lang; .) and '"$CONDITION"' and .TARGET != "aarch64-apple-darwin")]' < .github/json_matrices/build-matrix.json)
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ jobs:

- name: Install & build & test
working-directory: go
shell: bash
env:
RC_VERSION: ${{ github.event.inputs.rc-version }}
CARGO_BUILD_JOBS: 1
run: |
if [[ -n "$RC_VERSION" ]]; then
make install-tools
Expand Down Expand Up @@ -223,6 +225,8 @@ jobs:

- name: Install and run linters
working-directory: go
env:
CARGO_BUILD_JOBS: 1
run: |
make install-dev-tools install-build-tools gen-c-bindings generate-protobuf lint-ci

Expand Down Expand Up @@ -384,6 +388,7 @@ jobs:

- name: Build and test
working-directory: ./go
shell: bash
env:
RC_VERSION: ${{ github.event.inputs.rc-version }}
run: |
Expand Down Expand Up @@ -457,6 +462,7 @@ jobs:

- name: Install & build & test
working-directory: go
shell: bash
env:
RC_VERSION: ${{ github.event.inputs.rc-version }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/install-rust-and-protoc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ inputs:
- aarch64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-darwin
- x86_64-pc-windows-msvc
github-token:
description: "GitHub token"
type: string
Expand Down
141 changes: 134 additions & 7 deletions .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ inputs:
- amazon-linux
- macos
- ubuntu
- windows
target:
description: "Specified target for rust toolchain, ex. x86_64-apple-darwin"
type: string
Expand All @@ -21,10 +22,15 @@ inputs:
- aarch64-apple-darwin
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
- x86_64-pc-windows-msvc
engine-version:
description: "Engine version to install"
required: false
type: string
language:
description: "The language being built (optional, for language-specific setup)"
required: false
type: string
github-token:
description: "GITHUB_TOKEN, GitHub App installation access token"
required: true
Expand Down Expand Up @@ -62,19 +68,140 @@ runs:
run: |
yum install -y gcc pkgconfig openssl openssl-devel which curl gettext libasan tar --allowerasing

- name: Install Rust toolchain and protoc
if: "${{ !contains(inputs.target, 'musl') }}"
uses: ./.github/workflows/install-rust-and-protoc
- name: Install software dependencies for Windows
shell: pwsh
if: "${{ inputs.os == 'windows' }}"
run: |
# Verify Rust toolchain is available
rustc --version
cargo --version

- name: Setup Python for Windows
if: "${{ inputs.os == 'windows' }}"
uses: actions/setup-python@v5
with:
target: ${{ inputs.target }}
github-token: ${{ inputs.github-token }}
python-version: "3.x"

- name: Setup WSL (Windows only)
if: "${{ inputs.os == 'windows' && inputs.engine-version }}"
uses: Vampire/setup-wsl@v6
with:
distribution: Ubuntu-22.04
use-cache: true
update: true
additional-packages: build-essential git pkg-config libssl-dev python3 python3-pip

- name: Optimize WSL for better performance (Windows)
if: "${{ inputs.os == 'windows' && inputs.engine-version }}"
shell: pwsh
run: |
# Optimize WSL for better performance before engine installation
Write-Host "Optimizing WSL configuration for engine build..."

# Create WSL config for better performance
$wslConfig = @"
[wsl2]
memory=6GB
processors=4
swap=2GB
localhostForwarding=true
"@
$wslConfig | Out-File -FilePath "$env:USERPROFILE\.wslconfig" -Encoding utf8

# Restart WSL to apply config
wsl --shutdown
Start-Sleep -Seconds 3

Write-Host "WSL optimization complete - ready for engine build"

- name: Cache Valkey build
if: "${{ inputs.engine-version }}"
uses: actions/cache@v4
id: cache-valkey
with:
path: |
valkey-cache/valkey-server
valkey-cache/valkey-cli
valkey-cache/valkey-benchmark
key: valkey-${{ inputs.engine-version }}-${{ inputs.os }}-${{ inputs.target }}-${{ github.sha }}
restore-keys: |
valkey-${{ inputs.engine-version }}-${{ inputs.os }}-${{ inputs.target }}-

- name: Install engine
shell: ${{ inputs.os == 'windows' && 'wsl-bash {0}' || 'bash' }}
if: "${{ inputs.engine-version && steps.cache-valkey.outputs.cache-hit == 'true' }}"
env:
ENGINE_VERSION: ${{ inputs.engine-version }}
OS_TYPE: ${{ inputs.os }}
WSLENV: ENGINE_VERSION:OS_TYPE
run: |
echo "Using cached Valkey binaries"
echo "OS_TYPE: '$OS_TYPE'"
echo "ENGINE_VERSION: '$ENGINE_VERSION'"
# Clone repo fresh
git clone https://github.com/valkey-io/valkey.git
cd valkey && git checkout "$ENGINE_VERSION"
# Move cached binaries to correct location (force overwrite)
mkdir -p src
cp -f ../valkey-cache/* src/ 2>/dev/null || true
# Install the cached binaries
sudo make install

- name: Build engine from source
shell: ${{ inputs.os == 'windows' && 'wsl-bash {0}' || 'bash' }}
if: "${{ inputs.engine-version && steps.cache-valkey.outputs.cache-hit != 'true' }}"
env:
ENGINE_VERSION: ${{ inputs.engine-version }}
OS_TYPE: ${{ inputs.os }}
WSLENV: ENGINE_VERSION:OS_TYPE
run: |
echo "Building Valkey from source"
echo "OS_TYPE: '$OS_TYPE'"
echo "ENGINE_VERSION: '$ENGINE_VERSION'"
# Install dependencies (only needed on Linux, Windows handled by Vampire)
if [ "$OS_TYPE" != "windows" ]; then
sudo apt install -y build-essential git pkg-config libssl-dev
fi
git clone https://github.com/valkey-io/valkey.git
cd valkey && git checkout "$ENGINE_VERSION" && make -j$(nproc) BUILD_TLS=yes
# Cache the built binaries - detect which naming convention is used
mkdir -p ../valkey-cache
if [ -f "src/valkey-server" ]; then
echo "Found Valkey binaries"
cp -f src/valkey-server src/valkey-cli src/valkey-benchmark ../valkey-cache/ 2>/dev/null || true
elif [ -f "src/redis-server" ]; then
echo "Found Redis binaries"
cp -f src/redis-server src/redis-cli src/redis-benchmark ../valkey-cache/ 2>/dev/null || true
else
echo "Warning: No server binaries found to cache"
fi
# Install the binaries
sudo make install

- name: Start engine server
shell: ${{ inputs.os == 'windows' && 'wsl-bash {0}' || 'bash' }}
if: "${{ inputs.engine-version }}"
uses: ./.github/workflows/install-engine
env:
OS_TYPE: ${{ inputs.os }}
WSLENV: OS_TYPE
run: |
echo "Starting Valkey server"
echo "OS_TYPE: '$OS_TYPE'"

# Start Valkey server in background
redis-server --daemonize yes --bind 0.0.0.0 --port 6379

# For Windows, write IP to a file that PowerShell can read
if [ "$OS_TYPE" = "windows" ]; then
hostname -I | awk '{print $1}' > /tmp/wsl_ip.txt
fi

- name: Install Rust toolchain and protoc
if: "${{ !contains(inputs.target, 'musl') }}"
uses: ./.github/workflows/install-rust-and-protoc
with:
engine-version: ${{ inputs.engine-version }}
target: ${{ inputs.target }}
github-token: ${{ inputs.github-token }}

- name: Install zig
if: ${{ contains(inputs.target, 'linux-gnu') }}
Expand Down
64 changes: 59 additions & 5 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
test-java:
name: Java Tests - ${{ matrix.java }}, EngineVersion - ${{ matrix.engine.version }}, Target - ${{ matrix.host.TARGET }}
needs: get-matrices
timeout-minutes: 35
timeout-minutes: ${{ matrix.host.OS == 'windows' && 60 || 35 }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -126,6 +126,7 @@ jobs:
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}
engine-version: ${{ matrix.engine.version }}
language: java

- name: Install protoc (protobuf)
uses: arduino/setup-protoc@v3
Expand Down Expand Up @@ -153,13 +154,34 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Setup Python3 for Windows
if: ${{ matrix.host.OS == 'windows' }}
shell: bash
run: |
# Create python3 symlink for Windows
ln -sf $(which python) /usr/bin/python3

- name: Build java client
working-directory: java
run: ./gradlew --build-cache --continue build -x javadoc
env:
CARGO_BUILD_JOBS: ${{ github.runner_cores || '2' }}
shell: bash
run: |
if [[ "${{ matrix.host.OS }}" == "windows" ]]; then
./gradlew.bat --build-cache --continue build -x javadoc
else
./gradlew --build-cache --continue build -x javadoc
fi

- name: Ensure no skipped files by linter
working-directory: java
run: ./gradlew --build-cache spotlessDiagnose | grep 'All formatters are well behaved for all files'
shell: bash
run: |
if [[ "${{ matrix.host.OS }}" == "windows" ]]; then
./gradlew.bat --build-cache spotlessDiagnose | grep 'All formatters are well behaved for all files'
else
./gradlew --build-cache spotlessDiagnose | grep 'All formatters are well behaved for all files'
fi

- uses: ./.github/workflows/test-benchmark
if: ${{ matrix.engine.version == '8.0' && matrix.host.RUNNER == 'ubuntu-latest' && matrix.java == '17' }}
Expand All @@ -182,7 +204,7 @@ jobs:
test-pubsub:
name: Java PubSubTests - ${{ matrix.java }}, EngineVersion - ${{ matrix.engine.version }}, Target - ${{ matrix.host.TARGET }}
needs: get-matrices
timeout-minutes: 35
timeout-minutes: ${{ matrix.host.OS == 'windows' && 60 || 35 }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -212,6 +234,7 @@ jobs:
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}
engine-version: ${{ matrix.engine.version }}
language: java

- name: Install protoc (protobuf)
uses: arduino/setup-protoc@v3
Expand Down Expand Up @@ -239,9 +262,38 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Setup networking and verify Valkey for PubSub (Windows)
if: ${{ matrix.host.OS == 'windows' }}
shell: pwsh
run: |
# Optimize WSL for better performance (PubSub tests)
Write-Host "Optimizing WSL configuration for PubSub tests..."

# Create WSL config for better performance
$wslConfig = @"
[wsl2]
memory=6GB
processors=4
swap=2GB
localhostForwarding=true
"@
$wslConfig | Out-File -FilePath "$env:USERPROFILE\.wslconfig" -Encoding utf8

# Restart WSL to apply config
wsl --shutdown
Start-Sleep -Seconds 3

Write-Host "WSL optimization complete"

- name: Test pubsub
working-directory: java
run: ./gradlew --build-cache :integTest:pubsubTest
shell: bash
run: |
if [[ "${{ matrix.host.OS }}" == "windows" ]]; then
./gradlew.bat --build-cache :integTest:pubsubTest
else
./gradlew --build-cache :integTest:pubsubTest
fi

- name: Upload test & spotbugs reports
if: always()
Expand Down Expand Up @@ -319,6 +371,7 @@ jobs:
os: ${{ matrix.host.OS }}
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}
language: java
engine-version: ${{ matrix.engine.version }}

- name: Install protoc (protobuf)
Expand Down Expand Up @@ -361,6 +414,7 @@ jobs:
working-directory: java
env:
GLIDE_CONTAINER_BUILD: true
CARGO_BUILD_JOBS: ${{ github.runner_cores || '2' }}
run: |
if [[ "${{ matrix.host.OS }}" == "amazon-linux" ]]; then
export JAVA_HOME=/usr/lib/jvm/java-${{matrix.java}}-amazon-corretto.x86_64
Expand Down
Loading
Loading