Upgrade containerisation and Micronaut-webserver workshops #150
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Native Image Reflection Workshop Pipeline | |
| on: | |
| push: | |
| paths: | |
| - 'native-image/reflection/lab/**' | |
| - '.github/workflows/github-actions-native-image-reflection.yml' | |
| jobs: | |
| build: | |
| name: Native Image Reflection on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up GraalVM | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and run | |
| run: | | |
| cd native-image/reflection/lab/ | |
| javac ReflectionExample.java | |
| 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" |