Skip to content

Ignore all annotations in all scopes if source is missing #995

Ignore all annotations in all scopes if source is missing

Ignore all annotations in all scopes if source is missing #995

Workflow file for this run

# Run all tests and builds all aspects of GWT using Java 11, 17, and 21. Runs
# nightly (plus or minus timzeones) on the main branch, and will also run right
# away on a push to a release branch. Release zips are uploaded as part of the
# build, though maven snapshots are not yet deployed.
name: Full build
on:
schedule:
# This time is selected to be early in the morning in NA/SA/EU/ME. This
# only runs on the default branch.
- cron: '0 6 * * *'
push:
# Build on pushes to main and release branches. For forks, the -test may
# be helpful to run tests when preparing a merge.
branches:
- 'main'
- 'release/*'
- '*-test'
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'
- 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 requires Java 11+ to build
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Build, style/api checks, test, produce docs
run: |
set -eux
cd gwt
java -version
ant -version
# Set env vars to ensure we get the build/test we expect
export \
TZ=America/Los_Angeles \
ANT_OPTS='-Dfile.encoding=UTF8 -Xmx2g' \
GWT_VERSION=HEAD-SNAPSHOT
# Run the ant tasks, disabling watchFileChanges to work around a github actions limitation
ant clean test dist doc \
-Dtest.jvmargs='-ea -Dgwt.watchFileChanges=false' \
-Dtest.web.htmlunit.disable=true \
-Dtest.nometa.htmlunit.disable=true \
-Dtest.emma.htmlunit.disable=true
- name: Report test results
uses: mikepenz/[email protected]
if: always()
with:
report_paths: 'gwt/build/out/**/test/**/reports/TEST-*.xml'
- name: Upload checkstyle xml for manual review in its own artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: checkstyle-reports-java${{ matrix.java-version }}
path: 'gwt/build/out/**/checkstyle*.xml'
- name: Upload test xml files for manual review in its own artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: junit-reports-java${{ matrix.java-version }}
path: 'gwt/build/out/**/test/**/reports/TEST-*.xml'
- name: On success, upload the release zip
uses: actions/upload-artifact@v4
with:
name: gwt-java${{ matrix.java-version }}
path: 'gwt/build/dist/gwt-*.zip'
- name: Set up sonatype credentials
# Using the same java version as above, set up a settings.xml file
uses: actions/setup-java@v4
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
# Define the ID for the server to put in settings.xml, and the env vars that will contain the secrets
server-id: sonatype-snapshots
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
- name: Nightly builds should be deployed as snapshots to sonatype
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
set -eux
# Set the version to deploy (it was also set in the build step above)
export GWT_VERSION=HEAD-SNAPSHOT
export GWT_MAVEN_REPO_URL=https://oss.sonatype.org/content/repositories/snapshots/
export GWT_MAVEN_REPO_ID=sonatype-snapshots
cd gwt
# With no user input, run the push-gwtproject.sh script to deploy org.gwtproject artifacts
maven/push-gwtproject.sh < /dev/null