Skip to content

Commit b929c68

Browse files
committed
Refactor Native Image Reflection Configuration with Tracing Agent demo
1 parent 2a76e29 commit b929c68

25 files changed

+134
-213
lines changed

.github/workflows/native-image-reflection-example.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/native-image-access-environment-variables.yml renamed to .github/workflows/native-image/access-environment-variables.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
push:
44
paths:
55
- 'native-image/access-environment-variables/**'
6-
- '.github/workflows/native-image-access-environment-variables.yml'
6+
- '.github/workflows/native-image/access-environment-variables.yml'
77
pull_request:
88
paths:
99
- 'native-image/access-environment-variables/**'
10-
- '.github/workflows/native-image-access-environment-variables.yml'
10+
- '.github/workflows/native-image/access-environment-variables.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: native-image/add-jfr-support
1+
name: native-image/add-jfr
22
on:
33
push:
44
paths:
5-
- 'native-image/add-jfr-support/**'
6-
- '.github/workflows/native-image-add-jfr-support.yml'
5+
- 'native-image/add-jfr/**'
6+
- '.github/workflows/native-image/add-jfr.yml'
77
pull_request:
88
paths:
9-
- 'native-image/add-jfr-support/**'
10-
- '.github/workflows/native-image-add-jfr-support.yml'
9+
- 'native-image/add-jfr/**'
10+
- '.github/workflows/native-image/add-jfr.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:
1414
permissions:
1515
contents: read
1616
jobs:
1717
run:
18-
name: Run 'native-image/add-jfr-support'
18+
name: Run 'native-image/add-jfr'
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 15
2121
strategy:
@@ -29,7 +29,7 @@ jobs:
2929
distribution: 'graalvm'
3030
github-token: ${{ secrets.GITHUB_TOKEN }}
3131
native-image-job-reports: 'true'
32-
- name: Run 'native-image/add-jfr-support'
32+
- name: Run 'native-image/add-jfr'
3333
run: |
34-
cd native-image/add-jfr-support
34+
cd native-image/add-jfr
3535
./run.sh

.github/workflows/native-image-add-jmx-support.yml renamed to .github/workflows/native-image/add-jmx.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: native-image/add-jmx-support
1+
name: native-image/add-jmx
22
on:
33
push:
44
paths:
5-
- 'native-image/add-jmx-support/**'
6-
- '.github/workflows/native-image-add-jmx-support.yml'
5+
- 'native-image/add-jmx/**'
6+
- '.github/workflows/native-image/add-jmx.yml'
77
pull_request:
88
paths:
9-
- 'native-image/add-jmx-support/**'
10-
- '.github/workflows/native-image-add-jmx-support.yml'
9+
- 'native-image/add-jmx/**'
10+
- '.github/workflows/native-image/add-jmx.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:
1414
permissions:
1515
contents: read
1616
jobs:
1717
run:
18-
name: Run 'native-image/add-jmx-support'
18+
name: Run 'native-image/add-jmx'
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 15
2121
strategy:
@@ -29,9 +29,9 @@ jobs:
2929
distribution: 'graalvm'
3030
github-token: ${{ secrets.GITHUB_TOKEN }}
3131
native-image-job-reports: 'true'
32-
- name: Run 'native-image/add-jmx-support'
32+
- name: Run 'native-image/add-jmx'
3333
run: |
34-
cd native-image/add-jmx-support
34+
cd native-image/add-jmx
3535
wget -q https://github.com/jiaqi/jmxterm/releases/download/v1.0.2/jmxterm-1.0.2-uber.jar
3636
javac SimpleJmx.java
3737
native-image -Ob --enable-monitoring=jmxserver,jmxclient,jvmstat -H:DynamicProxyConfigurationFiles=proxy-config.json SimpleJmx

.github/workflows/native-image-add-logging.yml renamed to .github/workflows/native-image/add-logging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
push:
44
paths:
55
- 'native-image/add-logging/**'
6-
- '.github/workflows/native-image-add-logging.yml'
6+
- '.github/workflows/native-image/add-logging.yml'
77
pull_request:
88
paths:
99
- 'native-image/add-logging/**'
10-
- '.github/workflows/native-image-add-logging.yml'
10+
- '.github/workflows/native-image/add-logging.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:

.github/workflows/native-image-build-from-jar.yml renamed to .github/workflows/native-image/build-from-jar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
push:
44
paths:
55
- 'native-image/build-from-jar/**'
6-
- '.github/workflows/native-image-build-from-jar.yml'
6+
- '.github/workflows/native-image/build-from-jar.yml'
77
pull_request:
88
paths:
99
- 'native-image/build-from-jar/**'
10-
- '.github/workflows/native-image-build-from-jar.yml'
10+
- '.github/workflows/native-image/build-from-jar.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:

.github/workflows/native-image-build-java-modules.yml renamed to .github/workflows/native-image/build-java-modules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
push:
44
paths:
55
- 'native-image/build-java-modules/**'
6-
- '.github/workflows/native-image-build-java-modules.yml'
6+
- '.github/workflows/native-image/build-java-modules.yml'
77
pull_request:
88
paths:
99
- 'native-image/build-java-modules/**'
10-
- '.github/workflows/native-image-build-java-modules.yml'
10+
- '.github/workflows/native-image-build/java-modules.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:

.github/workflows/native-image-build-shared-library.yml renamed to .github/workflows/native-image/build-shared-library.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
push:
44
paths:
55
- 'native-image/build-shared-library/**'
6-
- '.github/workflows/native-image-build-shared-library.yml'
6+
- '.github/workflows/native-image/build-shared-library.yml'
77
pull_request:
88
paths:
99
- 'native-image/build-shared-library/**'
10-
- '.github/workflows/native-image-build-shared-library.yml'
10+
- '.github/workflows/native-image/build-shared-library.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: native-image/build-static-images
2+
on:
3+
push:
4+
paths:
5+
- 'native-image/build-static-images/**'
6+
- '.github/workflows/native-image/build-static-images.yml'
7+
pull_request:
8+
paths:
9+
- 'native-image/build-static-images/**'
10+
- '.github/workflows/native-image/build-static-images.yml'
11+
schedule:
12+
- cron: "0 0 1 * *" # run every month
13+
workflow_dispatch:
14+
permissions:
15+
contents: read
16+
jobs:
17+
run-static:
18+
name: Run fully static
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 15
21+
strategy:
22+
matrix:
23+
java-version: ['21', '24-ea']
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: graalvm/setup-graalvm@v1
27+
with:
28+
java-version: ${{ matrix.java-version }}
29+
native-image-musl: 'true'
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
native-image-job-reports: 'true'
32+
- name: Run fully static
33+
run: |
34+
cd native-image/build-static-images
35+
javac EnvMap.java
36+
native-image --static --libc=musl EnvMap -o static-envmap
37+
run-mostly-static:
38+
name: Run mostly-static
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 15
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: graalvm/setup-graalvm@v1
44+
with:
45+
java-version: '24-ea'
46+
distribution: 'graalvm'
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
native-image-job-reports: 'true'
49+
- name: Run mostly-static
50+
run: |
51+
cd native-image/build-static-images
52+
javac EnvMap.java
53+
native-image -Ob --static-nolibc EnvMap -o mostly-static-envmap

.github/workflows/native-image-build-with-js-embedded.yml renamed to .github/workflows/native-image/build-with-js-embedded.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
33
push:
44
paths:
55
- 'native-image/build-with-js-embedded/**'
6-
- '.github/workflows/native-image-build-with-js-embedded.yml'
6+
- '.github/workflows/native-image/build-with-js-embedded.yml'
77
pull_request:
88
paths:
99
- 'native-image/build-with-js-embedded/**'
10-
- '.github/workflows/native-image-build-with-js-embedded.yml'
10+
- '.github/workflows/native-image/build-with-js-embedded.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: native-image/configure-with-tracing-agent
2+
on:
3+
push:
4+
paths:
5+
- 'native-image/configure-with-tracing-agent/**'
6+
- '.github/workflows/native-image/configure-with-tracing-agent.yml'
7+
pull_request:
8+
paths:
9+
- 'native-image/configure-with-tracing-agent/**'
10+
- '.github/workflows/native-image/configure-with-tracing-agent.yml'
11+
schedule:
12+
- cron: "0 0 1 * *" # run every month
13+
workflow_dispatch:
14+
permissions:
15+
contents: read
16+
jobs:
17+
run:
18+
name: Run 'native-image/configure-with-tracing-agent
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 15
21+
strategy:
22+
matrix:
23+
java-version: ['21', '24-ea']
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: graalvm/setup-graalvm@v1
27+
with:
28+
java-version: ${{ matrix.java-version }}
29+
distribution: 'graalvm'
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
native-image-job-reports: 'true'
32+
- name: Run 'native-image/configure-with-tracing-agent'
33+
run: |
34+
cd native-image/configure-with-tracing-agent
35+
./run.sh

0 commit comments

Comments
 (0)