Skip to content

Simple project to exercise sbt-native-image along with Github Actions to create binary releases for Linux, MacOS, and Windows

License

Notifications You must be signed in to change notification settings

mbari-org/sbtnatimage

Repository files navigation

sbtnatimage

This is a simple scala project mainly intended to exercise https://github.com/scalameta/sbt-native-image 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

Some notes:

  • Tip: Consider adding UPX 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.

About

Simple project to exercise sbt-native-image along with Github Actions to create binary releases for Linux, MacOS, and Windows

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages