Skip to content

Commit 1d8c0b3

Browse files
committed
ci: add test-graalvm workflow for PRs
Validates :example:packageGraalvmNative on Linux x64, macOS ARM64 and Windows x64 for every pull request, catching regressions in the desktop build before merge. Mirrors Nucleus's test-graalvm.yaml.
1 parent 96f89f3 commit 1d8c0b3

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Test GraalVM Native Image
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: test-graalvm-${{ github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-natives:
15+
uses: ./.github/workflows/build-natives.yaml
16+
17+
graalvm:
18+
needs: build-natives
19+
name: GraalVM - ${{ matrix.name }}
20+
runs-on: ${{ matrix.os }}
21+
timeout-minutes: 45
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- name: Linux x64
27+
os: ubuntu-latest
28+
- name: macOS ARM64
29+
os: macos-latest
30+
- name: Windows x64
31+
os: windows-latest
32+
33+
steps:
34+
- name: Checkout repo
35+
uses: actions/checkout@v4
36+
37+
- name: Download PDFium JNI natives
38+
uses: actions/download-artifact@v4
39+
with:
40+
path: pdfium/src/jvmMain/resources/pdfium/native/
41+
pattern: 'pdfium-jni-*'
42+
merge-multiple: true
43+
44+
- name: Select Xcode 26 (macOS)
45+
if: runner.os == 'macOS'
46+
run: sudo xcode-select -s /Applications/Xcode_26.0.app/Contents/Developer
47+
48+
- name: Setup Liberica NIK (GraalVM)
49+
uses: graalvm/setup-graalvm@v1
50+
with:
51+
distribution: 'liberica'
52+
java-version: '25'
53+
54+
- name: Setup MSVC (Windows)
55+
if: runner.os == 'Windows'
56+
uses: ilammy/msvc-dev-cmd@v1
57+
58+
- name: Setup Gradle
59+
uses: gradle/actions/setup-gradle@v5
60+
61+
- name: Build GraalVM native image
62+
shell: bash
63+
run: ./gradlew :example:packageGraalvmNative -PnativeMarch=compatibility --no-daemon --stacktrace
64+
65+
- name: Upload GraalVM artifacts
66+
if: always()
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: graalvm-${{ runner.os }}
70+
path: |
71+
example/build/compose/tmp/**/graalvm/output/**
72+
if-no-files-found: warn

0 commit comments

Comments
 (0)