grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.51k stars 766 forks source link

Use Zig to build aarch64 binaries #1249

Closed hronro closed 2 years ago

hronro commented 2 years ago

Fix #1159

I've tested macOS/Linux binaries by using them with a helloworld.proto file, and there is no issue with them. I even tested x86_64 binaries produced by Zig even if they are not included in the PR. Windows binaries are not tested yet since I don't have a Windows machine.

Feel free to check the CI running result in my forked repo: https://github.com/hronro/grpc-web/actions/runs/2413657979

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers listed above are authorized under a signed CLA.

hronro commented 2 years ago

BTW, it also helps reduce the build time.

The current workflow costs about 25 minutes for 3 platforms totally:

CleanShot 2022-05-31 at 16 41 02

Using Zig only cost 12 minutes for 3 platforms totally:

CleanShot 2022-05-31 at 16 41 12

sampajano commented 2 years ago

Thanks so much for the contrib again! :)

sampajano commented 2 years ago

Hmm i just tried to test run the workflow but it failed.. 😅

https://github.com/grpc/grpc-web/actions/runs/2449921379

Any ideas why? :)

hronro commented 2 years ago

Sorry I changed the Zig setup step to manually downloading, and I only tested it in a local Docker container, which is running with the root permission, however, we don't have the root permission in the GitHub Actions.

A quick fix would be to add sudo to the setup step, and I will submit another PR for fixing that asap.

Sorry for that again.

sampajano commented 2 years ago

Sorry I changed the Zig setup step to manually downloading, and I only tested it in a local Docker container, which is running with the root permission, however, we don't have the root permission in the GitHub Actions.

A quick fix would be to add sudo to the setup step, and I will submit another PR for fixing that asap.

Sorry for that again.

Aha no worries at all! Thanks for fixing it! 😃

sampajano commented 2 years ago

I have tested building the ARM binaries again and it worked! https://github.com/grpc/grpc-web/actions/runs/2490449724

Thanks again for the contrib, @hronro!