Skip to content

set java 11 as minimum for sample apps templates #496

set java 11 as minimum for sample apps templates

set java 11 as minimum for sample apps templates #496

Workflow file for this run

# Run simple checks to make sure that the build is sane when any branch is pushed or pull
# request created. Comments or annotations will be added to a pull request in the case of
# style guide violations. Presently, tests are not run on pull requests.
name: Quick smoke test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ['11', '17', '21', '22']
steps:
- name: Checkout GWT itself into one directory
uses: actions/checkout@v4
with:
path: 'gwt'
# we need depth=2 to see which style violations overlap with the current changes
fetch-depth: 2
- name: Checkout GWT tools into a sibling directory
uses: actions/checkout@v4
with:
repository: 'gwtproject/tools'
path: 'tools'
- name: Set up JDK ${{ matrix.java-version }}
# GWT presently requires Java 11+ to build
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Set up reviewdog for easier checks on the PR's checkstyle output
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Build, style/api checks, produce docs
# Presently this runs no tests at all, but could run quick tests
run: |
set -eux
cd gwt
# Set env vars to ensure we get the build we expect
export \
TZ=America/Los_Angeles \
ANT_OPTS=-Dfile.encoding=UTF8 \
ANT_OPTS=-Xmx2g
ant clean compile.tests dist doc checkstyle apicheck
- name: Create pull request comments/annotations for checkstyle from the java 21 build, even on failure
if: ${{ always() && github.event_name == 'pull_request' && matrix.java-version == '21' }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REVIEWDOG_SKIP_DOGHOUSE: true
run: |
set -eux
shopt -s globstar
cd gwt
for f in build/out/**/checkstyle*.xml ; do
echo $f
reviewdog -f=checkstyle -filter-mode=diff_context -reporter=github-pr-review -level=info < $f
done
- name: Upload checkstyle xml for manual review
uses: actions/upload-artifact@v4
if: ${{ matrix.java-version == '21' }}
with:
name: checkstyle-reports-java${{ matrix.java-version }}
path: 'gwt/build/out/**/checkstyle*.xml'
retention-days: 5