gson-comments/.github/workflows/build.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.5 KiB
YAML
Raw Normal View History

2021-09-24 17:34:16 +02:00
name: Build
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
2021-09-24 17:34:16 +02:00
jobs:
build:
name: "Build on JDK ${{ matrix.java }}"
strategy:
matrix:
java: [ 11, 17 ]
2021-09-24 17:34:16 +02:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up JDK ${{ matrix.java }}"
uses: actions/setup-java@v3
2021-09-24 17:34:16 +02:00
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
2021-09-24 17:34:16 +02:00
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