[GR-60094] Review and move native-netty-plot demo to archive. #2
This file contains 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: archive/native-netty-plot | |
on: | |
push: | |
paths: | |
- 'archive/native-netty-plot/**' | |
- '.github/workflows/archive-native-netty-plot.yml' | |
pull_request: | |
paths: | |
- 'archive/native-netty-plot/**' | |
- '.github/workflows/archive-native-netty-plot.yml' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
run: | |
name: Run 'archive/native-netty-plot' | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '21' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'maven' | |
native-image-job-reports: 'true' | |
- name: Run 'archive/native-netty-plot' | |
run: | | |
cd archive/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://localhost: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://localhost:8080/ |