Skip to content

Commit

Permalink
Refactor Build Build a Statically Linked or Mostly-Statically Linked …
Browse files Browse the repository at this point in the history
…Images demo
  • Loading branch information
olyagpl committed Nov 27, 2024
1 parent df7760f commit 18e0ee8
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 171 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/native-image-build-static-images.yml
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
57 changes: 0 additions & 57 deletions .github/workflows/native-static-images.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.txt
*.class
envmap
envmap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down
3 changes: 3 additions & 0 deletions native-image/build-static-images/README.md
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/).
8 changes: 8 additions & 0 deletions native-image/build-static-images/run.sh
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
112 changes: 0 additions & 112 deletions native-static-images/README.md

This file was deleted.

0 comments on commit 18e0ee8

Please sign in to comment.