From e370d6ff2b5fd6c6cbd4b0364e115ebaba6f342a Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 9 Jul 2024 10:22:48 -0700 Subject: [PATCH 1/6] Fix release version for java client. Signed-off-by: Yury-Fridlyand --- .github/workflows/java-cd.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/java-cd.yml b/.github/workflows/java-cd.yml index 38f83cb37e..9d3c2f73fc 100644 --- a/.github/workflows/java-cd.yml +++ b/.github/workflows/java-cd.yml @@ -99,15 +99,7 @@ jobs: - name: Set the release version shell: bash run: | - if ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}; then - R_VERSION="255.255.255" - elif ${{ 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=1.0.0" >> $GITHUB_ENV env: EVENT_NAME: ${{ github.event_name }} INPUT_VERSION: ${{ github.event.inputs.version }} From c3369d162b6f4ed05945e51ac24278e8712e1ddc Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 9 Jul 2024 10:30:49 -0700 Subject: [PATCH 2/6] Add mac runners to CD. Signed-off-by: Yury-Fridlyand --- .github/workflows/java-cd.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/java-cd.yml b/.github/workflows/java-cd.yml index 9d3c2f73fc..0c51500c2c 100644 --- a/.github/workflows/java-cd.yml +++ b/.github/workflows/java-cd.yml @@ -65,18 +65,18 @@ jobs: CLASSIFIER: linux-aarch_64, CONTAINER: "2_28" } - # - { - # OS: macos, - # RUNNER: macos-12, - # TARGET: x86_64-apple-darwin, - # CLASSIFIER: osx-x86_64 - # } - # - { - # OS: macos, - # RUNNER: macos-latest, - # TARGET: aarch64-apple-darwin, - # CLASSIFIER: osx-aarch_64 - # } + - { + OS: macos, + RUNNER: macos-12, + TARGET: x86_64-apple-darwin, + CLASSIFIER: osx-x86_64 + } + - { + OS: macos, + RUNNER: macos-latest, + TARGET: aarch64-apple-darwin, + CLASSIFIER: osx-aarch_64 + } runs-on: ${{ matrix.host.RUNNER }} From 867c0cf83cb0b14346dd3b9b80100e329c769bb5 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 9 Jul 2024 15:18:25 -0700 Subject: [PATCH 3/6] Generate sources with the release. Signed-off-by: Yury-Fridlyand --- java/client/build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/java/client/build.gradle b/java/client/build.gradle index e66d59f43b..165ca30133 100644 --- a/java/client/build.gradle +++ b/java/client/build.gradle @@ -216,6 +216,11 @@ publishing { } } +java { + withSourcesJar() +// withJavadocJar() +} + signing { sign publishing.publications } @@ -236,6 +241,12 @@ jar { archiveClassifier = "placeholder" } +sourcesJar { + // suppress following error + // Entry glide/api/BaseClient.java is a duplicate but no duplicate handling strategy has been set + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + spotbugsMain { reports { html { From 8901e3de7ee675ee2d8c5893ddb7394c865de02b Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 9 Jul 2024 15:21:20 -0700 Subject: [PATCH 4/6] Strip rust lib. Signed-off-by: Yury-Fridlyand --- java/client/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/client/build.gradle b/java/client/build.gradle index 165ca30133..51e4e1263d 100644 --- a/java/client/build.gradle +++ b/java/client/build.gradle @@ -157,7 +157,7 @@ tasks.register('copyNativeLib', Copy) { } jar.dependsOn('copyNativeLib') -copyNativeLib.dependsOn('buildRustRelease') +copyNativeLib.dependsOn('buildRustReleaseStrip') compileTestJava.dependsOn('copyNativeLib') test.dependsOn('buildRust') testFfi.dependsOn('buildRust') From 9356c9965f79ef9e108ccf38072391465f57ac85 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 9 Jul 2024 15:29:12 -0700 Subject: [PATCH 5/6] Revert Strip rust lib. Signed-off-by: Yury-Fridlyand --- java/client/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/client/build.gradle b/java/client/build.gradle index 51e4e1263d..165ca30133 100644 --- a/java/client/build.gradle +++ b/java/client/build.gradle @@ -157,7 +157,7 @@ tasks.register('copyNativeLib', Copy) { } jar.dependsOn('copyNativeLib') -copyNativeLib.dependsOn('buildRustReleaseStrip') +copyNativeLib.dependsOn('buildRustRelease') compileTestJava.dependsOn('copyNativeLib') test.dependsOn('buildRust') testFfi.dependsOn('buildRust') From 9428a19775686a8575f95a35bb1e4a93c4ddd8f1 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Wed, 10 Jul 2024 08:59:06 -0700 Subject: [PATCH 6/6] Address PR comments. Signed-off-by: Yury-Fridlyand --- .github/workflows/java-cd.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/java-cd.yml b/.github/workflows/java-cd.yml index 0c51500c2c..9dcaa8c4e9 100644 --- a/.github/workflows/java-cd.yml +++ b/.github/workflows/java-cd.yml @@ -99,7 +99,15 @@ jobs: - name: Set the release version shell: bash run: | - echo "RELEASE_VERSION=1.0.0" >> $GITHUB_ENV + if ${{ github.event_name == 'pull_request' }}; then + R_VERSION="255.255.255" + elif ${{ 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" env: EVENT_NAME: ${{ github.event_name }} INPUT_VERSION: ${{ github.event.inputs.version }}