Refactor builds#536
Conversation
|
Ok, good news/bad news. Good news, this is actually building things! I believe we could fix this by using https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ to build amd64 base images and arm64 binaries, but I'm not entirely sure if that'll help for stuff like PHP. I'd intuit that it'd help in C++, but I'm not sure if it'd work to build amd64 grpc and otel then link to an arm64 binary. Would love if @brettmc and/or @DebajitDas could chime in with ideas as well. |
|
Cc @lalitb on the above question too |
That won't work for C++. Tagging @esigo as he has done some work on qemu/ARM CI builds earlier. |
|
I know only two ways to address the slow build issue.
I can work on the second option after C++ metric GA. |
|
Please see #458 (comment) for the current state of work here. |
|
Ok, I'm willing to call this good. I've renamed the PR to reflect what it currently does (which is just refactor the build rather than support multi-arch) but it does lay the foundation for multi-arch in the future. As a benefit, this significantly decreases build time due to parallelizing each service. Since it can do that, and run on free instances, I'm inclined to keep the per-PR build check in there to ensure that we aren't getting compilation errors. |
|
Doing a bit more work to try and speed up CPP by installing https://github.com/rui314/mold to speed up linking. Pre-mold: gRPC build 1043s Pre-mold: OpenTelemetry build 172s ... Unfortunately, building mold costs 520s, thus obliviating the speedup 🙃 However, I suspect greater returns on end-user hardware so it's probably worth keeping? |
|
Unfortunately, I don’t see improvements in local builds: Ryzen 5600G: Mac M1 Pro: currencyservice and featureflagservice build times increased. The mold linker gave some linking improvements on x86, but the mold install takes way too long to be beneficial overall. |
|
I think the GitHub workflow changes should be delivered separately. |
* switch to matrix build strategy Co-authored-by: Carter Socha <[email protected]>
* switch to matrix build strategy Co-authored-by: Carter Socha <[email protected]>
This fixes the problems with multi-arch builds -- the context for each build is not consistent.