-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Build Build a Statically Linked or Mostly-Statically Linked …
…Images demo
- Loading branch information
Showing
7 changed files
with
48 additions
and
171 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: native-image/build-static-images | ||
on: | ||
push: | ||
paths: | ||
- 'native-image/build-static-images/**' | ||
- '.github/workflows/native-image-build-static-images.yml' | ||
pull_request: | ||
paths: | ||
- 'native-image/build-static-images/**' | ||
- '.github/workflows/native-image-build-static-images.yml' | ||
schedule: | ||
- cron: "0 0 1 * *" # run every month | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
jobs: | ||
run-static: | ||
name: Run static 'native-image/build-static-images' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
java-version: ['23', '24-ea'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
native-image-musl: 'true' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
- name: Run static images build | ||
run: | | ||
cd native-image/build-static-images | ||
./run.sh |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
native-static-images/.gitignore → native-image/build-static-images/.gitignore
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
*.txt | ||
*.class | ||
envmap | ||
envmap |
2 changes: 1 addition & 1 deletion
2
native-static-images/EnvMap.java → native-image/build-static-images/EnvMap.java
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Building Statically Linked or Mostly-Statically Linked Native Executables | ||
|
||
You can find the steps to run this demo on [the website](https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
javac EnvMap.java | ||
# Run fully static image build | ||
native-image -Ob --static --libc=musl EnvMap | ||
# Run mostly-static image build | ||
native-image -Ob --static-nolibc EnvMap |
This file was deleted.
Oops, something went wrong.