Skip to content

use JGit 7.5.0 & GraalVM for JDK 25 #52

use JGit 7.5.0 & GraalVM for JDK 25

use JGit 7.5.0 & GraalVM for JDK 25 #52

Workflow file for this run

name: Gradle native image build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Manually triggered via the Actions UI
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }} with Java ${{ matrix.java-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
java-version: [17, 21, 25]
graalvm-distribution: ['liberica']
fail-fast: false
steps:
- name: Git checkout
uses: actions/checkout@v6
- name: Verify Gradle Wrapper
uses: gradle/actions/wrapper-validation@v5
- name: Set up GraalVM ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }}
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.graalvm-distribution }}
cache: 'gradle'
- name: Report Java version
run: |
java -version
javac -version
native-image --version
- name: Install libxi-dev in Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y libxi-dev
- name: Build with Gradle Wrapper (Linux)
run: ./gradlew --no-daemon --info nativeCompile
if: runner.os != 'Windows'
- name: Build with Gradle Wrapper (Windows)
run: .\gradlew.bat --no-daemon --info nativeCompile
if: runner.os == 'Windows'
env:
# Needed for Windows; to resolve issue with temp folder during native image build, due to
# relativization problem when different drives are used, such as in GHA runners.
# https://github.com/graalvm/native-build-tools/issues/754
GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }}
- name: Package Linux artifacts
if: runner.os == 'Linux'
uses: actions/upload-artifact@v6
with:
name: jgit ${{ runner.os }} native image with SubstrateVM for Java ${{ matrix.java-version }}
path: |
build/native/nativeCompile/
!build/native/nativeCompile/reports
- name: Package Windows artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v6
with:
name: jgit ${{ runner.os }} native image with SubstrateVM for Java ${{ matrix.java-version }}
path: |
build/native/nativeCompile/
!build/native/nativeCompile/native-image-*.args
!build/native/nativeCompile/reports