Skip to content

Fixed Exception in DownloadCommand if version not found #31

Fixed Exception in DownloadCommand if version not found

Fixed Exception in DownloadCommand if version not found #31

Workflow file for this run

name: Build Graal Native Image
on:
workflow_dispatch:
workflow_call:
push:
pull_request:
types: [opened, reopened]
jobs:
build:
runs-on: ${{ matrix.os.os }}
strategy:
matrix:
os:
- { os: windows-latest, name: headlessmc-launcher-windows-x64 }
- { os: ubuntu-latest, name: headlessmc-launcher-linux-x64 }
- { os: macos-latest, name: headlessmc-launcher-macos-x64 }
# TODO Use https://github.com/marketplace/actions/run-on-architecture to support ARM
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '23'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Output Graal Info
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: Grant execute permission for gradlew
if: runner.os != 'Windows'
run: chmod +x gradlew
- name: Build with Gradle
run: |
./gradlew -Phmc_graal_executable=${{ matrix.os.name }} -Phmc_graal_build=true headlessmc-graalvm:nativeCompile
- name: List files
run: ls headlessmc-graalvm/build/native/nativeCompile
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: HeadlessMc Native Image ${{ matrix.os.name }}
path: |
./headlessmc-graalvm/build/native/nativeCompile/*