Skip to content

Native build

Native build #19

Workflow file for this run

name: Native build
on:
workflow_dispatch:
inputs:
platform:
required: false
description: Binary platform
type: string
default: "macOS-latest"
workflow_call:
inputs:
platform:
required: false
description: Binary platform
type: string
default: "macOS-latest"
jobs:
# Build native executable per runner
package:
name: 'Build with Graal on ${{ inputs.platform }}'
runs-on: ${{ inputs.platform }}
steps:
- name: 'Check out repository'
uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: 'Build project'
run: mvn install -DskipTests
- name: 'Build Native Image'
run: |
mvn -ntp -B --file pom.xml -Pnative package -DskipTests -pl server,cli
- name: 'Create distribution'
run: |
mvn -ntp -B --file pom.xml -Pdist package -DskipTests -pl server,cli
- name: 'Upload build artifact'
uses: actions/upload-artifact@v5
with:
name: power-server-${{ runner.os }}-${{ runner.arch }}
path: |
server/target/distributions/*.tar.gz
cli/target/distributions/*.tar.gz