Skip to content

Commit

Permalink
Update to GWT 2.12
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tbroyer committed Oct 31, 2024
1 parent a04fb25 commit df5abcf
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 10 deletions.
55 changes: 46 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -89,7 +89,7 @@ jobs:
distribution: temurin
java-version: |
${{ matrix.java }}
8
21
- name: Cache Maven dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -117,15 +117,15 @@ 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

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '21'

- name: Cache Maven dependencies
uses: actions/cache@v4
Expand All @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<gwtVersion>2.11.0</gwtVersion>
<gwtVersion>2.12.0</gwtVersion>
</properties>

<dependencies>
Expand Down

0 comments on commit df5abcf

Please sign in to comment.