abstruse
abstruse copied to clipboard
feat(): Multiarch support
Hey! I was looking for an option to cross-compile some program, long story short: cross compilation is not supported.
And I've discovered that docker support --platform switch.
Setup required:
# apt install -y qemu binfmt-support qemu-user-static# docker run --rm --privileged multiarch/qemu-user-static:register
And while this solution is nowhere close to being fast, it works, it runs arm images on amd64 host.
root@oldpc ~# docker run --rm -ti --platform linux/arm/v7 debian:latest uname -m
armv7l
Which mean that you could do a native build of arm64 binaries on amd64 host, in case when cross compilation is not an option. Or you could test if some edge-case happen on arm hosts.
What do you think about bringing support of --platform switch to the Abstruse CI? In my opinion it should be configurable in the matrix in .abstruse.yml, like this:
platform: host // Special platform that just take `uname -m` as platform
matrix:
- platform: arm64
- platform: arm/v7