-
Notifications
You must be signed in to change notification settings - Fork 146
41 lines (41 loc) · 1.46 KB
/
native-image-reflection-example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: native-image-reflection-example
on:
push:
paths:
- 'native-image-reflection-example/**'
- '.github/workflows/native-image-reflection-example.yml'
pull_request:
paths:
- 'native-image-reflection-example/**'
- '.github/workflows/native-image-reflection-example.yml'
schedule:
- cron: "0 0 1 * *" # run every month
workflow_dispatch:
permissions:
contents: read
jobs:
run:
name: Run 'native-image-reflection-example'
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
java-version: ['17', 'dev']
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Run 'native-image-reflection-example'
run: |
cd native-image-reflection-example
javac ReflectionExample.java
mkdir -p META-INF/native-image
java -agentlib:native-image-agent=config-output-dir=META-INF/native-image ReflectionExample StringReverser reverse "hello"
java -agentlib:native-image-agent=config-merge-dir=META-INF/native-image ReflectionExample StringCapitalizer capitalize "hello"
native-image ReflectionExample
./reflectionexample StringReverser reverse "hello"
./reflectionexample StringCapitalizer capitalize "hello"