From eba736db0c6f0ab643e9e6f1cb2ad38c79efba0b Mon Sep 17 00:00:00 2001 From: azam Date: Tue, 10 Sep 2024 19:04:00 +0000 Subject: [PATCH 1/4] Update Github Actions --- .github/workflows/build.yml | 35 +++++++++++++++++++++++------------ .github/workflows/package.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00e3d94..53fcf55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,31 +18,42 @@ on: jobs: test: - name: test-${{matrix.distribution}}-${{matrix.version}} + name: test-${{matrix.name}} runs-on: ubuntu-latest strategy: matrix: - name: - - jdk8 - - jdk11 include: - - name: jdk8 + - name: temurin-jdk8 version: 8 distribution: temurin - - name: jdk11 + - name: temurin-jdk11 version: 11 distribution: temurin - - name: jdk16 - version: 16 - distribution: temurin - - name: jdk17 + - name: temurin-jdk17 version: 17 distribution: temurin + - name: temurin-jdk21 + version: 21 + distribution: temurin + # Latest version + - name: temurin-jdk22 + version: 22 + distribution: temurin + # More distribution for latest LTS + - name: oracle-jdk21 + version: 21 + distribution: oracle + - name: corretto-jdk21 + version: 21 + distribution: corretto + - name: zulu-jdk21 + version: 21 + distribution: zulu steps: - name: checkout-${{matrix.name}} - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: setup-toolchain-${{matrix.name}} - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: ${{matrix.version}} distribution: ${{matrix.distribution}} diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 0516007..b2264c2 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -16,9 +16,9 @@ jobs: packages: write steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup-toolchain - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: 8 distribution: temurin diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a90d858..76f2b6e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,9 +15,9 @@ jobs: packages: write steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup-toolchain - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: 8 distribution: temurin From fb24d15769864ee73e4544b76585e38f5ffe42ef Mon Sep 17 00:00:00 2001 From: azam Date: Tue, 10 Sep 2024 19:41:59 +0000 Subject: [PATCH 2/4] Change compiler source and target on JDK higher than 17 for tests --- .github/workflows/build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53fcf55..c343145 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,10 +35,6 @@ jobs: - name: temurin-jdk21 version: 21 distribution: temurin - # Latest version - - name: temurin-jdk22 - version: 22 - distribution: temurin # More distribution for latest LTS - name: oracle-jdk21 version: 21 @@ -49,6 +45,10 @@ jobs: - name: zulu-jdk21 version: 21 distribution: zulu + # Latest versions + - name: temurin-jdk22 + version: 22 + distribution: temurin steps: - name: checkout-${{matrix.name}} uses: actions/checkout@v4 @@ -59,4 +59,7 @@ jobs: distribution: ${{matrix.distribution}} cache: maven - name: verify-${{matrix.name}} + if: ${{matrix.version<=17}} run: mvn verify --settings .settings.xml -Dgpg.skip -B -V + - name: verify-as-jdk8-${{matrix.name}} + run: mvn verify -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 --settings .settings.xml -Dgpg.skip -B -V From cfc4c0d31d33872d42a8e0c1a0f1acc241b2bd7c Mon Sep 17 00:00:00 2001 From: azam Date: Tue, 10 Sep 2024 19:54:23 +0000 Subject: [PATCH 3/4] Delegate source parameter for javadoc to maven.compiler.source --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 978fd5b..e1b1db3 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,8 @@ 2.10.4 - 7 + + From 0b2f9f7d536590d6276bb9165f5a62f1cf218c1c Mon Sep 17 00:00:00 2001 From: azam Date: Tue, 10 Sep 2024 20:02:57 +0000 Subject: [PATCH 4/4] Add tests as JDK 11, 17 and 21 --- .github/workflows/build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c343145..4b0944b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,18 @@ jobs: distribution: ${{matrix.distribution}} cache: maven - name: verify-${{matrix.name}} + # Java 1.7 is source compatible only up to JDK 17 if: ${{matrix.version<=17}} run: mvn verify --settings .settings.xml -Dgpg.skip -B -V - name: verify-as-jdk8-${{matrix.name}} + if: ${{matrix.version>=8}} run: mvn verify -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 --settings .settings.xml -Dgpg.skip -B -V + - name: verify-as-jdk11-${{matrix.name}} + if: ${{matrix.version>=11}} + run: mvn verify -Dmaven.compiler.source=11 -Dmaven.compiler.target=11 --settings .settings.xml -Dgpg.skip -B -V + - name: verify-as-jdk17-${{matrix.name}} + if: ${{matrix.version>=17}} + run: mvn verify -Dmaven.compiler.source=17 -Dmaven.compiler.target=17 --settings .settings.xml -Dgpg.skip -B -V + - name: verify-as-jdk21-${{matrix.name}} + if: ${{matrix.version>=21}} + run: mvn verify -Dmaven.compiler.source=21 -Dmaven.compiler.target=21 --settings .settings.xml -Dgpg.skip -B -V