scalameta / scalafmt

Code formatter for Scala
http://scalameta.org/scalafmt
Apache License 2.0
1.42k stars 276 forks source link

Build arm64 docker image #4101

Open harryzcy opened 1 month ago

harryzcy commented 1 month ago

Related https://github.com/scalameta/scalafmt/issues/3542

kitbellew commented 1 month ago

one other point: ci workflow simply checks whether a new commit is valid. if you want to have an image to install, i'd expect it to be published in release workflow.

@tgodzik would you be able to confirm that?

harryzcy commented 1 month ago

it seems to me that you're trying to introduce an alternative to the existing process. can you please suggest a way to reuse it instead?

I'm reusing bin/build-native-image.sh here.

RUN microdnf install -y git \
  && bin/build-native-image.sh \
  && mv scalafmt-cli/target/native-image/cli /bin/scalafmt

Does sbt-native-image only work with Java 8 and Java 11? The sbtscala/scala-sbt image only offers arm64 for Java 17, and I'm having issues building it

Also, the graalvm doesn't seem to support building with static linking with musl. https://github.com/oracle/graal/issues/7103.