Use M1 for native image creation #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: GraalVM Native Image builds | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: mqtt-cli native image for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest-xlarge, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '23.0.1' | |
java-version: '17' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Compile native executable | |
run: ./gradlew nativeCompile | |
- name: Upload native executable | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mqtt-cli-${{ matrix.os }} | |
path: build/native/nativeCompile/mqtt-cli* |