Skip to content

Commit

Permalink
Test running server
Browse files Browse the repository at this point in the history
Signed-off-by: Guian Gumpac <[email protected]>
  • Loading branch information
GumpacG committed Sep 11, 2024
1 parent d84eb68 commit 757838b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 36 deletions.
75 changes: 49 additions & 26 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,31 @@ jobs:
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS | contains(["maven"])))' < .github/json_matrices/build-matrix.json | jq -c .)"
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
set-release-version:
runs-on: ubuntu-latest
outputs:
RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }}
steps:
- name: Set the release version
id: release-version
shell: bash
run: |
if ${{ github.event_name == 'workflow_dispatch' }}; then
R_VERSION="${{ env.INPUT_VERSION }}"
else
R_VERSION=${GITHUB_REF:11}
fi
echo "RELEASE_VERSION=${R_VERSION}" >> $GITHUB_ENV
echo "Release version detected: $R_VERSION"
echo "RELEASE_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
env:
INPUT_VERSION: ${{ github.event.inputs.version }}

deployment-all-platforms:
needs: load-platform-matrix
needs: [set-release-version, load-platform-matrix]
env:
JAVA_VERSION: "11"
RELEASE_VERSION: ${{ needs.set-release-version.outputs.RELEASE_VERSION }}
strategy:
# Run all jobs
fail-fast: false
Expand All @@ -58,7 +79,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
java-version: ${{ env.JAVA_VERSION }}

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
Expand All @@ -73,31 +94,33 @@ jobs:
version: "26.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Test deployment
working-directory: java
run: |
./gradlew :benchmarks:run --args="--minimal --clients glide"
- name: Start Valkey server
run: |
if ${{ matrix.host.OS }} == 'ubuntu'; then
apt-get install valkey
systemctl start valkey
else
brew install valkey
brew services start valkey
fi
- name: Test deployment
working-directory: java
run: |
# export ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderName="Authorization"
# export ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderValue="Bearer $(echo "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" | base64)"
# export GLIDE_RELEASE_VERSION=${{ env.RELEASE_VERSION }}
./gradlew :benchmarks:run --args="--minimal --clients glide"

- name: Stop Valkey server
if: ${{ always() }}
run: |
if ${{ matrix.host.OS }} == 'ubuntu'; then
systemctl stop valkey
else
brew systemctl stop valkey
fi
#
# set-release-version:
# runs-on: ubuntu-latest
# outputs:
# RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }}
# steps:
# - name: Set the release version
# id: release-version
# shell: bash
# run: |
# if ${{ github.event_name == 'workflow_dispatch' }}; then
# R_VERSION="${{ env.INPUT_VERSION }}"
# else
# R_VERSION=${GITHUB_REF:11}
# fi
# echo "RELEASE_VERSION=${R_VERSION}" >> $GITHUB_ENV
# echo "Release version detected: $R_VERSION"
# echo "RELEASE_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
# env:
# INPUT_VERSION: ${{ github.event.inputs.version }}
#
# create-binaries-to-publish:
# needs: [set-release-version, load-platform-matrix]
Expand Down
14 changes: 4 additions & 10 deletions java/benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
def releaseVersion = System.getenv("GLIDE_RELEASE_VERSION");

// if (releaseVersion) {
implementation "io.valkey:valkey-glide:1.0.0:${osdetector.classifier}"
implementation "io.valkey:valkey-glide:1.0.1:${osdetector.classifier}"
// } else {
// implementation project(':client')
// }
Expand All @@ -26,12 +26,6 @@ dependencies {
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.13.0'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.5'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'

implementation group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.100.Final', classifier: 'linux-x86_64'
implementation group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.100.Final', classifier: 'linux-aarch_64'
implementation group: 'io.netty', name: 'netty-transport-native-kqueue', version: '4.1.100.Final', classifier: 'osx-x86_64'
implementation group: 'io.netty', name: 'netty-transport-native-kqueue', version: '4.1.100.Final', classifier: 'osx-aarch_64'

}

run.dependsOn ':client:buildRustRelease'
Expand All @@ -41,7 +35,7 @@ application {
mainClass = 'glide.benchmarks.BenchmarkingApp'
// Runs for GITHUB_ACTIONS for testing release Maven deployment. Force benchmarks to use glide-rs from Maven Central
// deployments.
// if (!System.getenv("ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderName")) {
// applicationDefaultJvmArgs = ['-Djava.library.path=../target/release']
// }
if (!System.getenv("ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderName")) {
applicationDefaultJvmArgs = ['-Djava.library.path=../target/release']
}
}

0 comments on commit 757838b

Please sign in to comment.