https://github.com/mbari-org/sbtnatimage
Simple project to exercise sbt-native-image along with Github Actions to create binary releases for Linux, MacOS, and Windows
https://github.com/mbari-org/sbtnatimage
Last synced: 10 months ago
JSON representation
Simple project to exercise sbt-native-image along with Github Actions to create binary releases for Linux, MacOS, and Windows
- Host: GitHub
- URL: https://github.com/mbari-org/sbtnatimage
- Owner: mbari-org
- License: apache-2.0
- Created: 2021-07-30T00:23:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T03:05:45.000Z (over 1 year ago)
- Last Synced: 2025-02-04T21:43:18.861Z (11 months ago)
- Language: Scala
- Size: 12.7 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sbtnatimage
This is a simple scala project mainly intended to exercise
and along with GitHub Actions to create binary releases
for Linux, macOS, and Windows.
The general setup here is rather adhoc, but it may still be useful to someone out there.
---
On your host machine:
$ sbt
> nativeImage
> nativeImageRun
my source location: /Users/carueda/github/mbari-org/sbtnatimage/out/sbtnatimage
> ^D
$ out/sbtnatimage
my source location: /Users/carueda/github/mbari-org/sbtnatimage/out/sbtnatimage
Release workflow: [.github/workflows/native.yml](.github/workflows/native.yml)
Some notes:
- Tip: Consider adding [UPX](https://upx.github.io/) into the workflow.
- The linux executable will be statically linked.
Just remove the `--static` option for a dynamically linked one.
(Or, create both artifacts depending on your needs, etc.)
- The macOS executable won't be signed; so, upon downloading it, the user
will need to do something like the following to be able to run it:
xattr -d com.apple.quarantine sbtnatimage
- Windows executable untested.