Bump sbt so it work on ARM-based Mac #176
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 Image | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
native-image: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
include: | |
# Replace "example" with the name your binary | |
- os: macOS-latest | |
uploaded_filename: example-x86_64-apple-darwin | |
local_path: example/target/native-image/example | |
- os: ubuntu-latest | |
uploaded_filename: example-x86_64-pc-linux | |
local_path: example/target/native-image/example | |
- os: windows-latest | |
uploaded_filename: example-x86_64-pc-win32.exe | |
local_path: example\target\native-image\example.exe | |
env: | |
# define Java options for both official sbt and sbt-extras | |
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
cache: sbt | |
- run: git fetch --tags || true | |
- name: Setup Windows C++ toolchain | |
uses: ilammy/msvc-dev-cmd@v1 | |
if: ${{ matrix.os == 'windows-latest' }} | |
- name: Build | |
shell: bash | |
run: | | |
echo $(pwd) | |
sbt clean example/nativeImage | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ${{ matrix.local_path }} | |
name: ${{ matrix.uploaded_filename }} | |
- name: Upload release | |
if: github.event_name == 'release' | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ matrix.local_path }} | |
asset_name: ${{ matrix.uploaded_filename }} | |
asset_content_type: application/zip |