Native build test #17
Workflow file for this run
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
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, macos-13 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: 'Check out repository' | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
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: | | |
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: power-server-${{ runner.os }}-${{ runner.arch }} | |
path: server/target/distributions/*.tar.gz | |
check: | |
needs: package | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Download all build artifacts' | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
pattern: power-server-* | |
merge-multiple: true | |
- name: 'Release with JReleaser' | |
env: | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
ls -la artifacts | |
mvn -ntp -B --file server/pom.xml -Prelease -DartifactsDir=artifacts jreleaser:full-release -Djreleaser.dry.run=true -Djreleaser.select.current.platform |