-
Notifications
You must be signed in to change notification settings - Fork 165
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
Re-enabling multiarch support #456
Conversation
Couldn't we use matrix to do multi arch builds? Also we don't push to dockerhub anymore, only ghcr. Also I don't fully understand why building the UI is disabled. I'm not a fan of server binaries that don't embed the UI, which might confuse downstream users when they run dim. |
Looking at the pipeline that you linked, the build times for different architectures is way too excessive. Why is this? I see that qemu is used in the workflow, although I'm not sure why. Are we emulating a different arch here? Couldn't we make the multi arch build a lot simpler? Rust has very good support for cross compilation. We could just use something like |
Im not really sure about the dynamic linking libraries, Will it work? Like build on libva amd64 and cross arm64 with libva arm64? Afaik it only work if it fully static like musl target. |
As far as I know libva is either not supported on non-x86 hardware or there aren't any devices that support vaapi on non-x86 hardware, as such we should disable vaapi for other architectures. That said I think we should still target musl for non-x86 architectures. What I had in mind is that we could use I imagine most of the time in the arm job is spent compiling dim while also emulating arm on x86. This can be avoided as described above. Since dim pretty much statically links everything, I doubt we will experience any hiccups here. |
So i played a bit, looking how cross played out in the end stuck on There is downgrade method likely working? workflow run:
Update : matrix result oom killed, using matrix as it count as one job, i assume matrix still using single runner. Im gonna revert to last working with nodejs build separately. |
Openssl with musl will be tricky. I wonder which dependency is using it and if we can replace it with rustls. p.s. you can amend your previous commit and force push instead of creating a lot of small commits for small fixes. Something like |
update: docker build via artifact, maybe need to create release or so, but it your preferences. |
Looks pretty good so far. I looked at the aarch64 binaries and it seems like it still loads libc.so. Are we not using musl here? p.s. I've got a raspi laying around, Ill try to test the binaries on it. |
Also I'm not a fan of how the docker-ci workflow is a separate workflow. Could we combine it with the rust-target-multi workflow? |
FYI I managed to get rid of openssl-sys on one of my branches. Turns out |
Yes, we can combine docker build with rust-target, currenctly just separated for faster testing. Ref: |
Just tried to compile targetting musl and it fails to link because of |
@martadinata666 We just need to replace Line 37 in 3810fc1
reqwest = { version = "0.11.0", features = ["json", "rustls-tls"], default-features = false } Doing this should get rid of any dependency on openssl. |
Not really sure about this, do we need it? Is this for supporting ssl protocol out of the box without reverse proxy? Otherhand, i agree just stay at glibc, this alpine musl, we could but via qemu, that defeating the purpose fast binary build. I will revert dim binary build and combine with docker build tomorrow. 👍🏼 |
I think we should still depend on rustls as I trust rust code more than C++ ;p. This will just affect the reqwest dependency which we use to fetch assets and make API calls. The api server already uses rustls (and supports tls without a reverse proxy). |
I see, moving to rusttls pretty much not an issue then. 👍🏼 Last build success: ✅ |
This looks good. Will give this another quick review Monday and then I'm happy to merge! |
Looks like building an aarch64 image is failing. The other CI jobs (docs / rust build) can be ignored |
Let me sync up with new commits and see the result, https://github.com/martadinata666/dim/actions/runs/3123000524 |
Is it any specific reason that the tool chain locked in? https://raw.githubusercontent.com/Dusk-Labs/dim/master/rust-toolchain |
Yes, the toolchain is currently pinned because rustc releases newer than that version (both stable and nightly) fail to compile dim in release mode due to an ICE caused by some sort of MIR bug. |
FYI if you rebase onto master, |
Rebase to master again, and last build success, https://github.com/martadinata666/dim/actions/runs/3124534900 |
In this PR we do old way, build everything separately, then gather and push manifest. Some issue is the currecnt
Dockerfile
can't be used for this, as we will build js out side docker, and only builddim
in container. I thought createDockerfile.ci
for this use case. Technically still like master Dockerfile but with UI build disabled.Build proof :
https://github.com/martadinata666/dim/actions/runs/2565143979
Thoughts?