From df5abcffec7608673f1221dda34ff49f61083673 Mon Sep 17 00:00:00 2001 From: Thomas Broyer Date: Thu, 31 Oct 2024 12:49:50 +0100 Subject: [PATCH] Update to GWT 2.12 Rework JDK testing: always build with the latest (LTS) JDK, then test with older ones, and because GWT 2.12 requires JDK 11, then test JDK 8 compatibility with GWT 2.11. --- .github/workflows/maven.yml | 55 +++++++++++++++++++++++++++++++------ pom.xml | 2 +- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5005281..24b17d2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -8,7 +8,7 @@ on: paths-ignore: - '**/*.md' -# First build on Linux with JDK 8 and Windows with JDK 11 +# First build on Linux and Windows with JDK 21 (LTS) # Then run tests with various JDK and GWT versions (Linux only) jobs: linux: @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8' + java-version: '21' - name: Cache Maven dependencies uses: actions/cache@v4 @@ -50,7 +50,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '21' - name: Cache Maven dependencies uses: actions/cache@v4 @@ -73,13 +73,13 @@ jobs: name: windows-reports path: target/it-tests/*/build.log + # Note: GWT 2.12 requires JDK 11, so JDK 8 compatibility will be tested independently test-jdks: needs: linux runs-on: ubuntu-latest strategy: matrix: - java: [ '11', '17', '21' ] - continue-on-error: ${{ matrix.java == '21' }} + java: [ '11', '17' ] steps: - uses: actions/checkout@v4 @@ -89,7 +89,7 @@ jobs: distribution: temurin java-version: | ${{ matrix.java }} - 8 + 21 - name: Cache Maven dependencies uses: actions/cache@v4 @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - gwt: ["2.10.0", "HEAD-SNAPSHOT"] + gwt: ["2.11.0", "HEAD-SNAPSHOT"] continue-on-error: ${{ matrix.gwt == 'HEAD-SNAPSHOT' }} steps: - uses: actions/checkout@v4 @@ -125,7 +125,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8' + java-version: '21' - name: Cache Maven dependencies uses: actions/cache@v4 @@ -150,12 +150,49 @@ jobs: name: gwt-${{ matrix.gwt }}-reports path: target/it-tests/*/build.log + # GWT 2.12 requires JDK 11, so test JDK 8 with 2.11 + test-jdk8-gwt211: + needs: linux + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup JDK 8 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: | + 8 + 21 + + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: | + ~/.m2/repository/ + !~/.m2/repository/**/*-SNAPSHOT/ + target/it-repo/ + !target/it-repo/**/*-SNAPSHOT/ + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + + - name: Build with Maven + id: maven-build + run: mvn -B -U -ntp verify --fail-at-end "-Dinvoker.javaHome=$JAVA_HOME_8_X64" -DgwtVersion=2.11.0 + + - name: Store reports + if: always() && (steps.maven-build.outcome == 'success' || steps.maven-build.outcome == 'failure') + uses: actions/upload-artifact@v4 + with: + name: jdk-8-reports + path: target/it-tests/*/build.log + deploy_snapshot: needs: - linux - windows - test-jdks - test-gwt + - test-jdk8-gwt211 if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: @@ -164,7 +201,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '21' server-id: 'ossrh' server-username: OSSRH_USERNAME server-password: OSSRH_TOKEN diff --git a/pom.xml b/pom.xml index 0464272..0dc95f4 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ UTF-8 UTF-8 - 2.11.0 + 2.12.0