Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix native-image mapping for aarch64, #474 #475

Merged
merged 1 commit into from
Oct 19, 2021
Merged

Conversation

lanmaoxinqing
Copy link
Contributor

No description provided.

@ppalaga
Copy link
Contributor

ppalaga commented Sep 9, 2021

There is no way to test this on GH actions yet.

@lanmaoxinqing
Copy link
Contributor Author

There is no way to test this on GH actions yet.

I'll glad to update GH actions to support aarch64 builds.

But before that, i find jansi-native also do not support aarch64 due to same problem.

So this fix cannot actually work until we release a newer jansi version with aarch64 support.

@ppalaga
Copy link
Contributor

ppalaga commented Sep 9, 2021

There is no way to test this on GH actions yet.

That was just a side note, not a reason against this, sorry :)

I'll glad to update GH actions to support aarch64 builds.

I wonder how? AFAIK aarch64 is not supported yet.

@lanmaoxinqing
Copy link
Contributor Author

lanmaoxinqing commented Sep 10, 2021

That was just a side note, not a reason against this, sorry :)

Oh i just mean that it's my pleasure to update GH actions~ sorry for my poor english :->)

I wonder how? AFAIK aarch64 is not supported yet.

AFAIK the platform dependent part of mvnd is native image building and jansi dependency, it only needs a few work to compat with aarch64, and it's my pleasure to figure it out if i'm wrong :)

Then just like how we have done in jansi, my idea is to use docker image multiarch/crossbuild to build and test aarch64 releases in GH actions.

linux-arm64:
	docker run -it --rm -v $$PWD:/workdir -e CROSS_TRIPLE=aarch64-linux-gnu multiarch/crossbuild make clean-native native OS_NAME=Linux OS_ARCH=arm64

@ppalaga
Copy link
Contributor

ppalaga commented Sep 14, 2021

I wonder how? AFAIK aarch64 is not supported yet.

AFAIK the platform dependent part of mvnd is native image building and jansi dependency, it only needs a few work to compat with aarch64, and it's my pleasure to figure it out if i'm wrong :)

Then just like how we have done in jansi, my idea is to use docker image multiarch/crossbuild to build and test aarch64 releases in GH actions.

linux-arm64:
	docker run -it --rm -v $$PWD:/workdir -e CROSS_TRIPLE=aarch64-linux-gnu multiarch/crossbuild make clean-native native OS_NAME=Linux OS_ARCH=arm64

Thanks for the explanation (I am really unexperienced with arm builds and testing on Linux)
What you mention covers the building of the aarch64 binary - that's valuable.
However, it is still unclear to me whether/how the crossbuild image can help with testing the aarch64 binary on GH Actions?

@ppalaga
Copy link
Contributor

ppalaga commented Sep 14, 2021

Running our tests also on aarch64 would be nice, but it is not a blocker in case there is no way to do it on GH Actions or on some other free CI.

@lanmaoxinqing
Copy link
Contributor Author

Running our tests also on aarch64 would be nice, but it is not a blocker in case there is no way to do it on GH Actions or on some other free CI.

You are right. The solution above can only test and build binary in docker but not directly in GH actions, which can not block invalid PRs.

Specify a arm64 machine to run GH actions will be the best solution, but it seems that only self-hosted machines is supported so far.

@electrum
Copy link

You can use https://github.com/docker/setup-qemu-action to allow running arm64 Docker images on GH actions:

- uses: docker/setup-qemu-action@v1
  with:
    platforms: arm64

@lanmaoxinqing
Copy link
Contributor Author

lanmaoxinqing commented Sep 16, 2021

You can use https://github.com/docker/setup-qemu-action to allow running arm64 Docker images on GH actions:

That’s great! I will try it later when i finish my current works, thanks for your help~

@gnodet gnodet merged commit ea15711 into apache:master Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants