Skip to content

[#304] Remove unnecessary maven profiles from the release CI job configuration #97

[#304] Remove unnecessary maven profiles from the release CI job configuration

[#304] Remove unnecessary maven profiles from the release CI job configuration #97

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-java-with-maven
name: Java CI with Maven on Pull
on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
java-version:
- { name: "17", java_version_numeric: 17 }
- { name: "21", java_version_numeric: 21 }
- { name: "25", java_version_numeric: 25 }
- { name: "26-ea", java_version_numeric: 26, from: 'jdk.java.net' }
runs-on: ubuntu-latest
steps:
- name: Checkout the sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up latest JDK ${{ matrix.java-version.name }} from jdk.java.net
if: matrix.java-version.from == 'jdk.java.net'
uses: oracle-actions/setup-java@2e744f723b003fdd759727d0ff654c8717024845 # v1.4.0
with:
website: jdk.java.net
release: ${{ matrix.java-version.java_version_numeric }}
- name: Set up JDK ${{ matrix.java-version.name }}
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
if: matrix.java-version.from != 'jdk.java.net'
with:
java-version: ${{ matrix.java-version.java_version_numeric }}
distribution: 'temurin'
cache: maven
- name: Build API
run: |
EXTRA_ARGS=""
if [[ "${{ matrix.java-version.java_version_numeric }}" -lt 21 ]]; then
# for JDKs < 21 we should skip extra checks as those won't pass:
EXTRA_ARGS="-Pskip-checks"
fi
./mvnw -B install --file pom.xml $EXTRA_ARGS