This is an automated email from the ASF dual-hosted git repository.
gian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new f9439970c92 run build and unit tests using Java 21 (#15088)
f9439970c92 is described below
commit f9439970c926ec832e3f14cc235a46ec86784499
Author: Xavier Léauté <[email protected]>
AuthorDate: Fri Oct 6 12:45:07 2023 -0700
run build and unit tests using Java 21 (#15088)
* run build and unit test using Java 21
* run static checks with Java 21
* use setup-java for unit tests, since Java 21 is not built-in
* skip maven cache from setup-java
* add comments to explain cache behavior
---
.github/workflows/reusable-unit-tests.yml | 10 ++++++++--
.github/workflows/standard-its.yml | 2 ++
.github/workflows/static-checks.yml | 2 +-
.github/workflows/unit-and-integration-tests-unified.yml | 15 ++++++++++-----
4 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/reusable-unit-tests.yml
b/.github/workflows/reusable-unit-tests.yml
index 34d992c397c..06a48362c40 100644
--- a/.github/workflows/reusable-unit-tests.yml
+++ b/.github/workflows/reusable-unit-tests.yml
@@ -59,9 +59,15 @@ jobs:
with:
fetch-depth: 0
- - name: setup jdk${{ inputs.jdk }}
- run: echo "JAVA_HOME=$JAVA_HOME_${{ inputs.jdk }}_X64" >> $GITHUB_ENV
+ # skip the "cache: maven" step from setup-java. We explicitly use a
+ # different cache key since we cannot reuse it across commits.
+ - uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: ${{ inputs.jdk }}
+ # the build step produces SNAPSHOT artifacts into the local maven
repository,
+ # we include github.sha in the cache key to make it specific to that
build/jdk
- name: Restore Maven repository
id: maven-restore
uses: actions/cache/restore@v3
diff --git a/.github/workflows/standard-its.yml
b/.github/workflows/standard-its.yml
index 2648dc0993b..ae78a1f2a83 100644
--- a/.github/workflows/standard-its.yml
+++ b/.github/workflows/standard-its.yml
@@ -153,6 +153,8 @@ jobs:
- name: Setup java
run: export JAVA_HOME=$JAVA_HOME_8_X64
+ # the build step produces SNAPSHOT artifacts into the local maven
repository,
+ # we include github.sha in the cache key to make it specific to that
build/jdk
- name: Restore Maven repository
id: maven-restore
uses: actions/cache/restore@v3
diff --git a/.github/workflows/static-checks.yml
b/.github/workflows/static-checks.yml
index 4b1c4db0c68..49cd516f5ca 100644
--- a/.github/workflows/static-checks.yml
+++ b/.github/workflows/static-checks.yml
@@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [ '8', '11', '17' ]
+ java: [ '8', '11', '17', '21' ]
runs-on: ubuntu-latest
steps:
- name: checkout branch
diff --git a/.github/workflows/unit-and-integration-tests-unified.yml
b/.github/workflows/unit-and-integration-tests-unified.yml
index 6ff6c8bd650..d834143695d 100644
--- a/.github/workflows/unit-and-integration-tests-unified.yml
+++ b/.github/workflows/unit-and-integration-tests-unified.yml
@@ -56,16 +56,21 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [ '8', '11', '17' ]
+ jdk: [ '8', '11', '17', '21' ]
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- - name: setup jdk${{ matrix.jdk }}
- run: |
- echo "JAVA_HOME=$JAVA_HOME_${{ matrix.jdk }}_X64" >> $GITHUB_ENV
+ # skip the "cache: maven" step from setup-java. We explicitly use a
+ # different cache key since we cannot reuse it across commits.
+ - uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: ${{ matrix.jdk }}
+ # the build step produces SNAPSHOT artifacts into the local maven
repository,
+ # we include github.sha in the cache key to make it specific to that
build/jdk
- name: Cache Maven m2 repository
id: maven
uses: actions/cache@v3
@@ -112,7 +117,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [ 11, 17 ]
+ jdk: [ 11, 17, 21 ]
name: "unit tests (jdk${{ matrix.jdk }}, sql-compat=true)"
uses: ./.github/workflows/unit-tests.yml
needs: unit-tests
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]