jnr / jffi

Java Foreign Function Interface
Apache License 2.0
168 stars 78 forks source link

Add workflow to build native library with qemu & docker #90

Closed TobiX closed 3 years ago

TobiX commented 4 years ago

Initial stab at providing a GitHub action to build the native libraries with qemu & docker (see #69).

This is my first GitHub Action, so it can probably be improved :smile:

Docker's multi-platform support is kinda iffy: It took me quite a while to realize I got the wrong image on docker run, because an already existing image was used and docker doesn't realize that had the wrong platform...

I did a quick check and this method will probably work for

Those are all platforms available for the debian:9 image. debian:10 would additionally give us:

But then you have to jump through some hoops to get Java 8 :roll_eyes:

All of those start under qemu-user, I only tried builds with the arm64 one...

headius commented 4 years ago

Wow this is excellent! Confirmed on the Java 8 limitation; to be honest if we have Java 8 testing on one or two platforms I'm not concerned about testing on all platforms. I will have a look at this tomorrow and we can start moving toward fully automated Linux binaries!

headius commented 3 years ago

Bumped to 1.3.2 so we can get an update out but this is going to happen.

headius commented 3 years ago

@TobiX Do you see any reason we can't merge this in as is, and then iterate in place? As mentioned recently in #69 there may be more self-contained options going forward but I think getting the workflow merged is a good place to start.

TobiX commented 3 years ago

Nope, should work as-is. As said before, this is only for arm64 currently, but it should be easy to add other architectures by just copy&pasting :smile:

headius commented 3 years ago

@TobiX Awesome, it is merged and we can move forward.

TobiX commented 3 years ago

Arrg, and now it breaks. Probably missing an apt-get update - I'll push a followup pull request when I'm awake again :sleeping: