3 ms·
I'm probably wrong, but I think this kind of cross-compilation requires a nested virtualization and GHA hosted runners don't support it.
by 0x457 2y ago
I'm probably wrong, but I think this kind of cross-compilation requires a nested virtualization and GHA hosted runners don't support it.
- yjftsjthsd-h 2y agoWhy would it need virtualization at all? The point of cross-compiling is that you build binaries for a different arch/platform, ex. running gcc as an x86_64 binary on an x86_64 host turning C into aarch64 binaries.
- AlotOfReading 2y agoYou can do cross compilation in GitHub actions and testing on QEMU is straightforward. I have a repo that builds for and tests half a dozen emulated targets.
- Cyph0n 2y agoGHA can do nested virt via KVM. Here is an action that runs a test that boots up a VM running NixOS: https://github.com/aksiksi/compose2nix/blob/main/.github/workflows/nixos.yml https://github.com/aksiksi/compose2nix/blob/main/.github/wor... You can also run QEMU if you want to build for ARM (although this announcement makes this unnecessary): https://github.com/aksiksi/ncdmv/blob/aa108a1c1e2c14a13dfbc0407f7f595ca205a4f6/.github/workflows/package.yml#L51 https://github.com/aksiksi/ncdmv/blob/aa108a1c1e2c14a13dfbc0...
- ncruces 2y agoThey've done for a while. My OSS Go project runs tests in 18 different OS/architecture combinations. Some native, some using QEMU binfmt (user mode emulation on Linux), others launching a VM. In particular, that's how I test the BSDs and Solaris. https://github.com/ncruces/go-sqlite3/wiki/Support-matrix https://github.com/ncruces/go-sqlite3/wiki/Support-matrix