49964ee7a6
Bumps the github-actions group with 2 updates: [actions/setup-java](https://github.com/actions/setup-java) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/setup-java` from 4.0.0 to 4.1.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](387ac29b30...9704b39bf2
) Updates `github/codeql-action` from 3.24.5 to 3.24.6 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](47b3d888fe...8a470fddaf
) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
76 lines
3.1 KiB
YAML
76 lines
3.1 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 ]
|
|
# Custom JDK 21 configuration
|
|
include:
|
|
- java: 21
|
|
# Disable Enforcer check which (intentionally) prevents using JDK 21 for building
|
|
extra-mvn-args: -Denforcer.fail=false
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: "Set up JDK ${{ matrix.java }}"
|
|
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
|
|
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 --no-transfer-progress verify javadoc:jar ${{ matrix.extra-mvn-args || '' }}
|
|
|
|
native-image-test:
|
|
name: "GraalVM Native Image test"
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: "Set up GraalVM"
|
|
uses: graalvm/setup-graalvm@5393c3d80982e8a7fa61005137824ef53731ff9a # v1.1.8.1
|
|
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 --no-transfer-progress --activate-profiles native-image-test --projects graal-native-image-test --also-make
|
|
|
|
verify-reproducible-build:
|
|
name: "Verify reproducible build"
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: "Set up JDK 17"
|
|
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 17
|
|
cache: 'maven'
|
|
|
|
- name: "Verify no plugin issues"
|
|
run: mvn artifact:check-buildplan --batch-mode --no-transfer-progress
|
|
|
|
- name: "Verify reproducible build"
|
|
# See https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
|
|
run: |
|
|
mvn clean install --batch-mode --no-transfer-progress -Dproguard.skip -DskipTests
|
|
# Run with `-Dbuildinfo.attach=false`; otherwise `artifact:compare` fails because it creates a `.buildinfo` file which
|
|
# erroneously references the existing `.buildinfo` file (respectively because it is overwriting it, a file with size 0)
|
|
# See https://issues.apache.org/jira/browse/MARTIFACT-57
|
|
mvn clean verify artifact:compare --batch-mode --no-transfer-progress -Dproguard.skip -DskipTests -Dbuildinfo.attach=false
|