Skip to content

Native build test

Native build test #8

Workflow file for this run

name: Native build test
on:
workflow_dispatch:
jobs:
# Build native executable per runner
package:
name: 'Build with Graal on ${{ matrix.os }}'
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: 'Build Native Image'
run: |
mvn install -DskipTests
pushd server
mvn -ntp -B --file pom.xml -Pnative package -DskipTests
popd
- name: 'Create distribution'
run: |
pushd server
mvn -ntp -B --file pom.xml -Pdist package -DskipTests
popd
- name: 'Upload build artifact'
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ runner.os }}-${{ runner.arch }}
path: |
server/target/distributions/*.zip
server/target/distributions/*.tar.gz