Sample application is written in Go.
It only output GOOS and GOARCH. See main.go.
Binaries for target architecture is built by cross compile using GOARCH.
import "runtime"
func main() {
println("GOOS :", runtime.GOOS)
println("GOARCH :", runtime.GOARCH)
}
Sample applications are run on Github runners as follows.
Installing QEMU.
Here, qemu-user which described at User Mode Emulation is used.
# Add repository to avoid much older qemu.
sudo add-apt-repository -y ppa:canonical-server/server-backports
sudo apt -y update
sudo apt -y install qemu-user
Running applications (Makefile is used).
See the QEMU User space emulator for available architectures.
GOARCH=arm GOARM=v7 go build
qemu-arm ./qemu-actions