Skip to content

Upgrade Isolates for GraalVM Native Images Demo. #76

Upgrade Isolates for GraalVM Native Images Demo.

Upgrade Isolates for GraalVM Native Images Demo. #76

name: native-netty-plot
on:
push:
paths:
- 'native-netty-plot/**'
- '.github/workflows/native-netty-plot.yml'
pull_request:
paths:
- 'native-netty-plot/**'
- '.github/workflows/native-netty-plot.yml'
schedule:
- cron: "0 0 1 * *" # run every month
workflow_dispatch:
permissions:
contents: read
jobs:
run:
name: Run 'native-netty-plot'
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
java-version: ['21', 'dev']
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Run 'native-netty-plot'
run: |
cd native-netty-plot
mvn --no-transfer-progress package
java -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image/com.oracle.substratevm/netty-plot -jar target/netty-plot-0.1-jar-with-dependencies.jar &
pid=$!
sleep 10
# query service without isolate to trigger AWT code, so that it gets picked up by the agent
curl -i http:https://127.0.0.1:8080/?useIsolate=false
kill $pid
# re-package project to include new reachability metadata collected by agent
mvn --no-transfer-progress package
native-image -jar target/netty-plot-0.1-jar-with-dependencies.jar
du -h netty-plot
./netty-plot &
sleep 10
curl http:https://localhost:8080/