Skip to content

Native Images 2023-03-20_UMLet_v15.1 by @ggrossetie #16

Native Images 2023-03-20_UMLet_v15.1 by @ggrossetie

Native Images 2023-03-20_UMLet_v15.1 by @ggrossetie #16

Workflow file for this run

name: Native Images On-Demand
on:
workflow_dispatch:
inputs:
tag:
description: tag
required: true
run-name: Native Images ${{ inputs.tag }} by @${{ github.actor }}
jobs:
native_images:
name: 'Build Native Image ${{ matrix.platform }}'
strategy:
matrix:
os: [ ubuntu-latest, ARM64 ]
include:
- os: 'ubuntu-latest'
platform: 'linux-amd64'
- os: 'ARM64'
platform: 'linux-arm64'
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.3'
java-version: '11'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Maven
run: mvn clean package
- name: Generate native image
run: |
mkdir -p native-image-config-dir
cat fixtures/state.xml | java -Djava.awt.headless=true -agentlib:native-image-agent=config-output-dir=native-image-config-dir -jar ./target/umlet.jar svg
cat fixtures/state.xml | java -Djava.awt.headless=true -agentlib:native-image-agent=config-merge-dir=native-image-config-dir -jar ./target/umlet.jar png
cat fixtures/state.xml | java -Djava.awt.headless=true -agentlib:native-image-agent=config-merge-dir=native-image-config-dir -jar ./target/umlet.jar jpeg
cat fixtures/sample.xml | java -Djava.awt.headless=true -agentlib:native-image-agent=config-merge-dir=native-image-config-dir -jar ./target/umlet.jar svg
cat fixtures/sample.xml | java -Djava.awt.headless=true -agentlib:native-image-agent=config-merge-dir=native-image-config-dir -jar ./target/umlet.jar png
cat fixtures/sample.xml | java -Djava.awt.headless=true -agentlib:native-image-agent=config-merge-dir=native-image-config-dir -jar ./target/umlet.jar jpeg
native-image -Djava.awt.headless=true -H:ConfigurationFileDirectories=native-image-config-dir --no-fallback --report-unsupported-elements-at-runtime -jar ./target/umlet.jar -H:Name="umlet-${{matrix.platform}}"
working-directory: ./umlet-cli
- name: Create release
run: |
gh release view "$RELEASE_VERSION" || gh release create "$RELEASE_VERSION"
gh release upload $RELEASE_VERSION './umlet-cli/umlet-${{matrix.platform}}#UMlet native image (${{matrix.platform}})' --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_VERSION: ${{ github.event.inputs.tag }}