gson-comments/.github/workflows/build.yml
Marcono1234 26b5a668b3
Add integration test for GraalVM Native Image (#2466)
* Add integration test for GraalVM Native Image

* Enable 'quickBuild' mode

Seems to improve build speed, and at least for the previous issue with
`RecordComponent` still causes test failures (as expected) if the fix
is reverted.
2023-08-13 08:44:00 -07:00

46 lines
1.5 KiB
YAML

name: Build
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
name: "Build on JDK ${{ matrix.java }}"
strategy:
matrix:
java: [ 11, 17 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up JDK ${{ matrix.java }}"
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
# This also runs javadoc:jar to detect any issues with the Javadoc generated during release
run: mvn --batch-mode --update-snapshots --no-transfer-progress verify javadoc:jar
native-image-test:
name: "GraalVM Native Image test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up GraalVM"
uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
distribution: 'graalvm'
# According to documentation in graalvm/setup-graalvm this is used to avoid rate-limiting issues
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
- name: Build and run tests
# Only run tests in `graal-native-image-test` (and implicitly build and run tests in `gson`),
# everything else is covered already by regular build job above
run: mvn test --batch-mode --update-snapshots --no-transfer-progress --activate-profiles native-image-test --projects graal-native-image-test --also-make