Native MacOS Image #6
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 MacOS Image | |
on: workflow_dispatch # Manually trigger the workflow | |
jobs: | |
build-and-upload: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-13 | |
arch: "darwin-amd64" | |
- os: macos-latest | |
arch: "darwin-arm64" | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: "21" | |
distribution: "graalvm-community" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: "maven" | |
native-image-job-reports: "true" | |
- name: Build darwin-amd64 (Intel) native | |
if: matrix.arch == 'darwin-amd64' | |
run: | | |
echo "GRAALVM_HOME: $GRAALVM_HOME" | |
echo "JAVA_HOME: $JAVA_HOME" | |
java --version | |
native-image -march=list | |
mvn package -Pnative -DskipTests -Dnative.march="-march=x86-64" | |
- name: Upload darwin-amd64 (Intel) native | |
if: matrix.arch == 'darwin-amd64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: restheart-darwin-amd64 | |
path: core/target/restheart | |
overwrite: true | |
- name: Build darwin-arm64 (Apple Silicon) native | |
if: matrix.arch == 'darwin-arm64' | |
run: | | |
echo "GRAALVM_HOME: $GRAALVM_HOME" | |
echo "JAVA_HOME: $JAVA_HOME" | |
java --version | |
native-image -march=list | |
mvn package -Pnative -DskipTests -Dnative.march="-march=armv8-a" | |
- name: Upload darwin-arm64 (Apple Silicon) native | |
if: matrix.arch == 'darwin-arm64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: restheart-darwin-arm64 | |
path: core/target/restheart | |
overwrite: true |