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

Setup CI infrastructure to run non-x86 builds #131

Open
nbaksalyar opened this issue Nov 25, 2020 · 8 comments
Open

Setup CI infrastructure to run non-x86 builds #131

nbaksalyar opened this issue Nov 25, 2020 · 8 comments
Labels
enhancement New feature or request infra CI & infrastructure

Comments

@nbaksalyar
Copy link
Member

We can run non-x86 builds with qemu (like e.g. rust-lang/libc does) in order to ensure that Headcrab can still be built without errors on non-x86 platforms (even if it's not entirely functional).

This will help us to prepare for introducing more target_archs in the future.

@nbaksalyar nbaksalyar added enhancement New feature or request infra CI & infrastructure labels Nov 25, 2020
@philipc
Copy link

philipc commented Nov 26, 2020

https://github.com/rust-embedded/cross is easy to use. It runs tests using qemu.

@nbaksalyar
Copy link
Member Author

Great suggestion, thank you!

@pro465
Copy link
Contributor

pro465 commented Apr 5, 2022

@nbaksalyar parhaps all you need to do is copy and paste https://gist.github.com/pro465/a33a080d82d2ea28725a5956abb57871

it should be noted that i basically copied and pasted https://github.com/actions-rs/example/blob/master/.github/workflows/cross_compile.yml with some changes to make it cross-test instead of cross-compile without knowing if it will work, and the last time the example was updated was two years ago, so I'm not sure if that will work.

@bjorn3
Copy link
Contributor

bjorn3 commented Apr 5, 2022

QEMU user mode doesn't support ptrace so using cross won't help unfortunately. A VM will likely be needed.

@pro465
Copy link
Contributor

pro465 commented Apr 5, 2022

oh that's unfortunate :(

@pro465
Copy link
Contributor

pro465 commented Apr 5, 2022

@bjorn3 but wait, does libc not contain ptrace too? then how do they run/test it in QEMU?

@bjorn3
Copy link
Contributor

bjorn3 commented Apr 5, 2022

The libc crate doesn't contain any tests at all AFAIK. They only check that it matches the C header files I believe.

@nbaksalyar
Copy link
Member Author

Yes, it's a matter of actually executing cross-arch code, whether it's cross-compilated or built natively.

It seems that the simplest option to execute tests would be to run CI on a dedicated server (e.g. there are arm-based nodes) - but we don't support any ISAs apart from x86_64 yet, so I would consider this more of a long-term goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request infra CI & infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants