-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(operations)!: Teach Environment to build for other architectures. #3358
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
Conversation
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Giving this a test in our docker environment |
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
I'm pulling in the ideas of #3257 here |
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Also pulled in #3352 |
I did some feature flag tweaking so I'm running a full build suite locally as well as up here on CI. :) |
Signed-off-by: Ana Hobden <[email protected]>
rbenv is struggling because the ubuntu distro has homebrew installed... |
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
This is now working for me locally! |
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
@Hoverbear can you link this to the issues it closes? |
So this mostly works. All the makefile integration and the vast majority of the building works. As far as I can tell, the problem lies in the Glibc to Musl linking. So we need to support the following goals:
Further goals are out of scope at this time, but this style of approach allows for our environment to learn to cross compile to other architectures in the future. We also looked at using So when you build the musl builds, there's a problem that (I think) I am fairly certain that this is a result of us doing something wrong with the C++ related cross compiling variables, as I am not very experienced here. As far as I know, all the Rust and C, and the majority of the C++, is working right, but it seems one thing is not. |
We're opting for #3657 |
Closes #3311
This introduces a simplified cross-compiler toolchain for us.
After removing our Armv7 builds in #3352 we could opt for a much, much simpler option with https://github.com/richfelker/musl-cross-make. This introduces the components to our environment, as well as adds tooling sufficient for our contributors to use it locally on most Linux machines.
Please note this process is a tad rough around the edges still, I plan to touch it up over the coming months. :)
As a consequence of #2824 we needed to teach our Environment to be multi-distro. I added this as well, it currently acts as CentOS7 during gnu builds, and Ubuntu 20.04 for MUSL builds.
Notable Changes
make build-{x86_64, aarch64}-*
are altered and now build outside of docker containers by default. They use musl-cross-make and you can useENVIRONMENT=true
to run them in our friendly environment.make build-armv7-*
is gone as per chore(operations)!: Removal of Armv7 support #3352make check-examples
since it was failing.ENVIRONMENT_BASEIMAGE
with a docker container (defaultubuntu:20.04
). The environment will try to build from that baseimage by searching thescripts/environments/bootstrap/
folder. You can also override withENVIRONMENT_BOOTSTRAP
set to a shell script.scripts/environment/cross
which is part of our.gitignore
. You can set a different place withMUSL_CROSS_MAKE
environment variable. I personally cloned musl-cross-make into my normal Git trees and set this environment variable.test
andcheck
jobs will collapse down into these new jobs in the future.RELEASE
flag defaulting totrue
is available. UseRELEASE=false
to dramatically speed upbuild-*
jobs.Important notes
target
but this lead to a poor user experience. Crosschains take up to 15 minutes to build so it's better to keep them outside of this folder we frequently wipe.nightly
andrelease
workflows with per-commit/PR release flows that are published when we tag. This is pulling us in that direction!Remaining burndown