Skip to content

Update Readmes to remove GU mentions and GraalVM JDK Downloader. #57

Update Readmes to remove GU mentions and GraalVM JDK Downloader.

Update Readmes to remove GU mentions and GraalVM JDK Downloader. #57

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"