1- # Run all tests and builds all aspects of GWT using Java 8. Runs nightly (plus
2- # or minus timzeones) on the main branch, and will also run right away on a
3- # push to a release branch. Release zips are uploaded as part of the build,
4- # though maven snapshots are not yet deployed.
1+ # Run all tests and builds all aspects of GWT using Java 11, 17, and 21. Runs
2+ # nightly (plus or minus timzeones) on the main branch, and will also run right
3+ # away on a push to a release branch. Release zips are uploaded as part of the
4+ # build, though maven snapshots are not yet deployed.
55name : Full build
66on :
7- schedule :
8- # This time is selected to be early in the morning in NA/SA/EU/ME. This
9- # only runs on the default branch.
10- - cron : ' 0 6 * * *'
117 push :
128 # Build on pushes to main and release branches. For forks, the -test may
139 # be helpful to run tests when preparing a merge.
1410 branches :
1511 - ' main'
1612 - ' release/*'
1713 - ' *-test'
14+ workflow_dispatch :
15+ # Allow running manually
16+ pull_request :
17+ types : [ labeled, synchronize ]
18+ permissions :
19+ # allow publishing JUnit report for PRs
20+ checks : write
1821jobs :
1922 build :
23+ if : ${{ !github.event.pull_request || contains(github.event.pull_request.labels.*.name, 'ready') }}
2024 runs-on : ubuntu-latest
2125 strategy :
2226 matrix :
23- java-version : [ '8 ' ] # [ '11 ', '17 ', '21 ' ]
27+ java-version : [ '11 ' ] # [ '17 ', '21 ', '22 ' ]
2428 java-distribution : [ 'temurin' ] # , 'sapmachine' ]
25- # include:
26- # - java-version: 8
27- # java-distribution: temurin
2829 steps :
2930 - name : Checkout GWT itself into one directory
30- uses : actions/checkout@v2
31+ uses : actions/checkout@v5
3132 with :
3233 path : ' gwt'
3334 - name : Checkout GWT tools into a sibling directory
34- uses : actions/checkout@v2
35+ uses : actions/checkout@v5
3536 with :
3637 repository : ' gwtproject/tools'
3738 path : ' tools'
3839 - name : Set up JDK ${{ matrix.java-version }}
39- # GWT presently requires Java8 to build, but can run on newer Java versions
40- uses : actions/setup-java@v4
40+ # GWT requires Java 11+ to build
41+ uses : actions/setup-java@v5
4142 with :
4243 java-version : ${{ matrix.java-version }}
4344 distribution : ${{ matrix.java-distribution }}
@@ -61,33 +62,32 @@ jobs:
6162 -Dtest.emma.htmlunit.disable=true
6263
6364 - name : Report test results
64- uses : mikepenz/action-junit-report@v3.1 .0
65+ uses : mikepenz/action-junit-report@v6.0 .0
6566 if : always()
6667 with :
6768 report_paths : ' gwt/build/out/**/test/**/reports/TEST-*.xml'
6869 - name : Upload checkstyle xml for manual review in its own artifact
69- uses : actions/upload-artifact@v4
70+ uses : actions/upload-artifact@v5
7071 if : always()
7172 with :
7273 name : checkstyle-reports-${{ matrix.java-version }}-${{ matrix.java-distribution }}
7374 path : ' gwt/build/out/**/checkstyle*.xml'
7475 - name : Upload test xml files for manual review in its own artifact
75- uses : actions/upload-artifact@v4
76+ uses : actions/upload-artifact@v5
7677 if : always()
7778 with :
78- name : junit-reports
7979 path : ' gwt/build/out/**/test/**/reports/TEST-*.xml'
8080
8181 - name : On success, upload the release zip
82- uses : actions/upload-artifact@v4
82+ uses : actions/upload-artifact@v5
8383 with :
8484 name : gwt-${{ matrix.java-version }}-${{ matrix.java-distribution }}
8585 path : ' gwt/build/dist/gwt-*.zip'
8686
8787 - name : Set up sonatype credentials
8888 # Using the same java version as above, set up a settings.xml file
89- uses : actions/setup-java@v4
90- if : github.event_name == 'schedule ' && github.repository_owner == 'gwtproject'
89+ uses : actions/setup-java@v5
90+ if : ${{ github.event_name == 'push ' && github.ref_name == 'main' && github. repository_owner == 'gwtproject' && matrix.java-version == '21' }}
9191 with :
9292 java-version : ${{ matrix.java-version }}
9393 distribution : ${{ matrix.java-distribution }}
@@ -97,15 +97,15 @@ jobs:
9797 server-password : SONATYPE_PASSWORD
9898
9999 - name : Nightly builds should be deployed as snapshots to sonatype
100- if : github.event_name == 'schedule ' && github.repository_owner == 'gwtproject'
100+ if : ${{ github.event_name == 'push ' && github.ref_name == 'main' && github. repository_owner == 'gwtproject' && matrix.java-version == '21' }}
101101 env :
102102 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
103103 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
104104 run : |
105105 set -eux
106106 # Set the version to deploy (it was also set in the build step above)
107107 export GWT_VERSION=HEAD-SNAPSHOT
108- export GWT_MAVEN_REPO_URL=https://oss .sonatype.org/content/repositories/ snapshots/
108+ export GWT_MAVEN_REPO_URL=https://central .sonatype.com/repository/maven- snapshots/
109109 export GWT_MAVEN_REPO_ID=sonatype-snapshots
110110 cd gwt
111111 # With no user input, run the push-gwtproject.sh script to deploy org.gwtproject artifacts
0 commit comments