Skip to content

Commit

Permalink
Merge branch 'release-1.1' into node/yipin-fix-Script-export
Browse files Browse the repository at this point in the history
  • Loading branch information
acarbonetto authored Sep 19, 2024
2 parents 8c6f59d + c672c62 commit cd53666
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 94 deletions.
1 change: 0 additions & 1 deletion .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ runs:
if: "${{ inputs.os == 'macos' }}"
run: |
brew update
brew upgrade || true
brew install git gcc pkgconfig openssl coreutils
- name: Install software dependencies for Ubuntu GNU
Expand Down
51 changes: 42 additions & 9 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,25 @@ jobs:
echo "Deployment ${{ env.DEPLOYMENT_ID }} was unsuccessful with status $DEPLOYMENT_STATUS"
exit 1
test-deployment-on-all-architectures:
needs: [set-release-version, load-platform-matrix, publish-to-maven-central-deployment]
env:
JAVA_VERSION: "11"
RELEASE_VERSION: ${{ needs.set-release-version.outputs.RELEASE_VERSION }}
strategy:
# Run all jobs
fail-fast: false
matrix:
host: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }}

runs-on: ${{ matrix.host.RUNNER }}
steps:
- name: Start Valkey server
uses: ./.github/actions/install-valkey
with:
engine-version: "7.2.5"
target: ${{ matrix.host.TARGET }}

- uses: actions/checkout@v4
with:
submodules: recursive
Expand All @@ -219,7 +238,14 @@ 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
with:
os: ${{ matrix.host.OS }}
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install protoc (protobuf)
uses: arduino/setup-protoc@v3
Expand All @@ -235,16 +261,9 @@ jobs:
export GLIDE_RELEASE_VERSION=${{ env.RELEASE_VERSION }}
./gradlew :benchmarks:run --args="--minimal --clients glide"
- name: Drop deployment if validation fails
if: ${{ failure() }}
run: |
curl --request DELETE \
-u "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" \
"https://central.sonatype.com/api/v1/publisher/deployment/${{ env.DEPLOYMENT_ID }}"
publish-release-to-maven:
if: ${{ inputs.maven_publish == true || github.event_name == 'push' }}
needs: [publish-to-maven-central-deployment]
needs: [test-deployment-on-all-architectures]
runs-on: ubuntu-latest
environment: AWS_ACTIONS
env:
Expand All @@ -255,3 +274,17 @@ jobs:
curl --request POST \
-u "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" \
"https://central.sonatype.com/api/v1/publisher/deployment/${{ env.DEPLOYMENT_ID }}"
drop-deployment-if-validation-fails:
if: ${{ failure() }}
needs: [publish-to-maven-central-deployment, test-deployment-on-all-architectures]
runs-on: ubuntu-latest
env:
DEPLOYMENT_ID: ${{ needs.publish-to-maven-central-deployment.outputs.DEPLOYMENT_ID }}
steps:
- name: Drop deployment if validation fails
run: |
curl --request DELETE \
-u "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" \
"https://central.sonatype.com/api/v1/publisher/deployment/${{ env.DEPLOYMENT_ID }}"
17 changes: 14 additions & 3 deletions .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
if ${{ env.EVENT_NAME == 'pull_request' }}; then
R_VERSION="255.255.255"
elif ${{ env.EVENT_NAME == 'workflow_dispatch' }}; then
echo "${{env.EVENT_NAME}}"
R_VERSION="${{ env.INPUT_VERSION }}"
else
R_VERSION=${GITHUB_REF:11}
Expand Down Expand Up @@ -229,8 +230,16 @@ jobs:
working-directory: ./node/npm/glide
run: |
export pkg_name=valkey-glide
echo "${GITHUB_REF:11}"
export package_version=${GITHUB_REF:11}
echo "The workflow is: ${{env.EVENT_NAME}}"
if ${{ env.EVENT_NAME == 'workflow_dispatch' }}; then
R_VERSION="${{ env.INPUT_VERSION }}"
else
R_VERSION=${GITHUB_REF:11}
fi
echo "RELEASE_VERSION=${R_VERSION}" >> $GITHUB_ENV
export package_version=${R_VERSION}
export scope=`if [ "$NPM_SCOPE" != '' ]; then echo "$NPM_SCOPE/"; fi`
mv package.json package.json.tmpl
envsubst < package.json.tmpl > "package.json"
Expand All @@ -239,6 +248,8 @@ jobs:
sed -i "s|@scope/|${scope}|g" index.ts
env:
NPM_SCOPE: ${{ vars.NPM_SCOPE }}
EVENT_NAME: ${{ github.event_name }}
INPUT_VERSION: ${{ github.event.inputs.version }}

- name: Build Node wrapper
uses: ./.github/workflows/build-node-wrapper
Expand All @@ -251,7 +262,7 @@ jobs:
- name: Check if RC and set a distribution tag for the package
shell: bash
run: |
if [[ "${GITHUB_REF:11}" == *"rc"* ]]
if [[ ${{ env.RELEASE_VERSION }} == *"rc"* ]]
then
echo "This is a release candidate"
export npm_tag="next"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ jobs:
if: github.repository_owner == 'valkey-io'
name: Publish packages to PyPi
runs-on: ${{ matrix.build.RUNNER }}
timeout-minutes: 25
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
build: ${{fromJson( needs.load-platform-matrix.outputs.PLATFORM_MATRIX )}}
build: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }}
steps:
- name: Setup self-hosted runner access
if: ${{ contains(matrix.build.RUNNER, 'self-hosted') }}
Expand Down Expand Up @@ -118,8 +118,7 @@ jobs:
if: startsWith(matrix.build.NAMED_OS, 'darwin')
run: |
brew update
brew upgrade || true
brew install python@3.9
brew install python@3.8 python@3.9
- name: Setup Python for self-hosted Ubuntu runners
if: contains(matrix.build.OS, 'ubuntu') && contains(matrix.build.RUNNER, 'self-hosted')
Expand Down Expand Up @@ -191,9 +190,9 @@ jobs:

- name: Upload Python wheels
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.build.TARGET }}
path: python/wheels
if-no-files-found: error

Expand All @@ -206,7 +205,8 @@ jobs:
- uses: actions/download-artifact@v4
with:
path: python/wheels
name: wheels
merge-multiple: true

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,6 @@ jobs:
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: smoke-test-report-amazon-linux
name: modules-test-report-${{ matrix.host.TARGET }}-python-${{ matrix.python }}-server-${{ matrix.engine.version }}
path: |
python/python/tests/pytest_report.html
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
* Python: Fix `XClaim` return type to `List[bytes]` instead of `List[TEncodable]` ([#2075](https://github.com/valkey-io/valkey-glide/pull/2075))

### Operational Enhancements
* Node: Get valkey/redis version using client's info command ([#2276]https://github.com/valkey-io/valkey-glide/pull/2276)
* CI/CD: Create Workflow to deploy artifacts for all platforms ([#2285](https://github.com/valkey-io/valkey-glide/pull/2285)
* Node: Get valkey/redis version using client's info command ([#2276](https://github.com/valkey-io/valkey-glide/pull/2276))
* Java: Fetch server version using client's info command ([#2258](https://github.com/valkey-io/valkey-glide/pull/2258))
* CI/CD: Add workflow for automating Maven release ([#2128](https://github.com/valkey-io/valkey-glide/pull/2128))

Expand Down
3 changes: 2 additions & 1 deletion java/benchmarks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id "com.google.osdetector" version "1.7.3"
}

repositories {
Expand All @@ -12,7 +13,7 @@ dependencies {
def releaseVersion = System.getenv("GLIDE_RELEASE_VERSION");

if (releaseVersion) {
implementation "io.valkey:valkey-glide:" + releaseVersion
implementation "io.valkey:valkey-glide:" + releaseVersion + ":${osdetector.classifier}"
} else {
implementation project(':client')
}
Expand Down
Loading

0 comments on commit cd53666

Please sign in to comment.