WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Bump the maven group with 9 updates #2450

Bump the maven group with 9 updates

Bump the maven group with 9 updates #2450

Workflow file for this run

name: Build
on:
push:
branches-ignore:
# Ignore Dependabot branches because it will also open a pull request, which would cause the
# workflow to redundantly run twice
- dependabot/**
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
env:
# Common Maven arguments
MAVEN_ARGS: --show-version --batch-mode --no-transfer-progress
jobs:
build:
name: "Build on JDK ${{ matrix.java }}"
strategy:
matrix:
java: [ 17, 21 ]
include:
# Custom JDK 11 configuration because some of the plugins and test dependencies don't support it anymore,
# but it is important to still test with a JDK version without Record classes
- java: 11
# Disable Enforcer check which (intentionally) prevents using JDK 11 for building
# Exclude 'test-graal-native-image' module because JUnit 6 requires >= Java 17
# Exclude 'proto' module because protobuf-maven-plugin requires >= Java 17
extra-mvn-args: -Denforcer.fail=false --projects '!test-graal-native-image,!proto'
- java: 25
# Disable Enforcer check which (intentionally) prevents using JDK 25 for building
# Exclude 'test-shrinker' because ProGuard does not support JDK 25 yet, see
# https://github.com/Guardsquare/proguard/issues/481 and https://github.com/Guardsquare/proguard/issues/473
# TODO: Once ProGuard supports JDK 25, also remove the corresponding 'JDK25' profile in `gson/pom.xml`
extra-mvn-args: -Denforcer.fail=false --projects '!test-shrinker'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: "Set up JDK ${{ matrix.java }}"
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.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 verify javadoc:jar ${{ matrix.extra-mvn-args || '' }}
# Build a subset of the Gson API, see also https://github.com/google/gson/pull/2946
build-gson-subset:
name: Build Gson subset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: Build with Maven
run: mvn clean test --projects gson --activate-profiles gson-subset
native-image-test:
name: "GraalVM Native Image test (JDK ${{ matrix.java }})"
strategy:
matrix:
java: [ 21 ]
include:
- java: 25
# Disable Enforcer check which (intentionally) prevents using JDK 25 for building
# TODO: Remove this once JDK 25 is fully supported for building Gson
extra-mvn-args: -Denforcer.fail=false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: "Set up GraalVM"
uses: graalvm/setup-graalvm@eec48106e0bf45f2976c2ff0c3e22395cced8243 # v1.4.2
with:
java-version: ${{ matrix.java }}
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 `test-graal-native-image` (and implicitly build and run tests in `gson`),
# everything else is covered already by regular build job above
run: mvn test --activate-profiles native-image-test --projects test-graal-native-image --also-make ${{ matrix.extra-mvn-args || '' }}
verify-reproducible-build:
name: "Verify reproducible build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: "Verify no plugin issues"
run: mvn artifact:check-buildplan --projects '!metrics,!test-graal-native-image,!test-jpms,!test-shrinker'
- 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 -Dmaven.test.skip --projects '!metrics,!test-graal-native-image,!test-jpms,!test-shrinker'
# 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 -Dmaven.test.skip --projects '!metrics,!test-graal-native-image,!test-jpms,!test-shrinker' -Dbuildinfo.attach=false