This is an automated email from the ASF dual-hosted git repository.
wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new c6e52b077 build: support building and testing Java and Scala Clients
with JDK 17 (#2263)
c6e52b077 is described below
commit c6e52b0770f82852636bf4f69567a4ee8be9ecd6
Author: Dan Wang <[email protected]>
AuthorDate: Wed Jul 2 11:43:43 2025 +0800
build: support building and testing Java and Scala Clients with JDK 17
(#2263)
- Upgrade `actions/setup-java` from v1 to v4.
- Introduce JDK 17 environment to CI workflows for Java/Scala client.
- To ensure compatibility with JDK 17:
1. Bump Scala version from 2.12.7 to 2.12.20;
2. Bump SBT version from 1.2.8 to 1.8.3.
---
.github/workflows/lint_and_test_java-client.yml | 8 +++++---
.github/workflows/lint_and_test_scala-client.yml | 8 +++++---
.github/workflows/regular-build.yml | 5 +++--
scala-client/build.sbt | 4 ++--
scala-client/project/build.properties | 2 +-
scala-client/project/plugins.sbt | 2 ++
6 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/lint_and_test_java-client.yml
b/.github/workflows/lint_and_test_java-client.yml
index cbc028f01..2b21e947d 100644
--- a/.github/workflows/lint_and_test_java-client.yml
+++ b/.github/workflows/lint_and_test_java-client.yml
@@ -40,9 +40,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
java-version: 8
+ distribution: temurin
- name: spotless
working-directory: ./java-client
run: mvn spotless:check
@@ -77,7 +78,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [ '8', '11']
+ java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
@@ -86,9 +87,10 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
+ distribution: temurin
- name: Download artifact
uses: "./.github/actions/download_artifact"
- name: Start Pegasus cluster
diff --git a/.github/workflows/lint_and_test_scala-client.yml
b/.github/workflows/lint_and_test_scala-client.yml
index 46fef3b7d..4368e6b71 100644
--- a/.github/workflows/lint_and_test_scala-client.yml
+++ b/.github/workflows/lint_and_test_scala-client.yml
@@ -40,9 +40,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
java-version: 8
+ distribution: temurin
- name: Install sbt
run: |
curl -s "https://get.sdkman.io" | bash
@@ -79,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [ '8', '11']
+ java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
@@ -88,9 +89,10 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
+ distribution: temurin
- name: Install sbt
run: |
curl -s "https://get.sdkman.io" | bash
diff --git a/.github/workflows/regular-build.yml
b/.github/workflows/regular-build.yml
index 05fa904c8..a1a8b3264 100644
--- a/.github/workflows/regular-build.yml
+++ b/.github/workflows/regular-build.yml
@@ -134,7 +134,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- java: [ '8', '11']
+ java: [ '8', '11', '17' ]
steps:
- uses: actions/cache@v3
with:
@@ -143,9 +143,10 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v4
- - uses: actions/setup-java@v1
+ - uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
+ distribution: temurin
- name: Download thrift
working-directory: ./java-client/scripts
run: ./download_thrift.sh
diff --git a/scala-client/build.sbt b/scala-client/build.sbt
index f16166544..e923df3b1 100644
--- a/scala-client/build.sbt
+++ b/scala-client/build.sbt
@@ -23,9 +23,9 @@ organization := "org.apache"
name := "pegasus-scala-client"
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.20"
-crossScalaVersions := Seq("2.11.7", "2.12.7")
+crossScalaVersions := Seq("2.12.15", "2.12.20")
publishMavenStyle := true
diff --git a/scala-client/project/build.properties
b/scala-client/project/build.properties
index 7ddcd05de..ce8764122 100644
--- a/scala-client/project/build.properties
+++ b/scala-client/project/build.properties
@@ -16,4 +16,4 @@
# specific language governing permissions and limitations
# under the License.
#
-sbt.version=1.2.8
+sbt.version=1.8.3
diff --git a/scala-client/project/plugins.sbt b/scala-client/project/plugins.sbt
index 24a4ef426..6e0498f64 100644
--- a/scala-client/project/plugins.sbt
+++ b/scala-client/project/plugins.sbt
@@ -17,4 +17,6 @@
* under the License.
*/
+// TODO(wangdan): replace com.geirsson with org.scalameta since
+// it has been deprecated.
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]