romgrk / fzy-lua-native

Luajit FFI bindings to FZY
118 stars 16 forks source link

Support aarch64 #4

Closed ruifm closed 3 years ago

romgrk commented 3 years ago

Cool! One question about the GHA config, isn't it possible to use matrix for the architecture as it's done for matrix.os? And if not, is it possible to make the build_x86 and build_aarch64 as identical as possible? Let me know if they're already at close as possible. Thanks.

ruifm commented 3 years ago

Cool! One question about the GHA config, isn't it possible to use matrix for the architecture as it's done for matrix.os?

According to the GHA docs for the run-on-arch action the issue with non-x86 architectures is that not all OSs are supported. For aarch64 only the ones on that list.

Thus, I don't think it's possible to reuse matrix like you were doing because only one os-arch combination is valid (ubuntu20.04) and all other combinations will fail.

And if not, is it possible to make the build_x86 and build_aarch64 as identical as possible? Let me know if they're already at close as possible. Thanks.

I can make them artificially similar but for the reason pointed above it does not make much sense since the matrix.os for aarch64 would only contain ubuntu20.04, so it's not really using the matrix GHA feature...

I ended up using the matrix strategy anyway.

I tested the GHA on my fork: https://github.com/ruifm/fzy-lua-native/pull/2 without your custom push action (since I cannot use it on my fork). It seems to work but we will only ever know it after (and if) you merge this PR.

I also managed to build it locally in my rpi3b+ on archlinuxarm using make. The only issue was that the lua binds were looking for a library with the name arm64 instead of aarch because jit.arch returned arm64. So my first commit creates that alias.

If you don't feel comfortable with the GHA changes, I can drop that commit and only keep the arch alias change since that should be completely ok.

romgrk commented 3 years ago

Ok cool, I'll merge as it is then :) Thanks

romgrk commented 3 years ago

Doesn't seem to work :(

https://github.com/romgrk/fzy-lua-native/runs/1504899015

Did the previous GHA config with 2 build jobs work?

ruifm commented 3 years ago

Doesn't seem to work :(

https://github.com/romgrk/fzy-lua-native/runs/1504899015

From looking at the logs it seems unrelated to this change. The failure is in the windows job due to a git conflict which I think it's weird. Can you maybe explain why that is? Can you try restarting the job?

The aarch64 job was canceled due to the failure in the windows job.

Did the previous GHA config with 2 build jobs work?

They both worked on my my fork https://github.com/ruifm/fzy-lua-native/pull/2 but I did not test with the custom publish-to-github@master step (which was the one that failed).

romgrk commented 3 years ago

Changed some things and it seems to work now, I think publish-to-github was rebasing stuff when there was nothing to commit.

Edit: or not -_- but it's a publish-to-github bug so I'll fix that

ruifm commented 3 years ago

Changed some things and it seems to work now, I think publish-to-github was rebasing stuff when there was nothing to commit.

Edit: or not -_- but it's a publish-to-github bug so I'll fix that

I'm glad you were able to fix it partially! Thanks for caring about alternative architectures!