Skip to content

An example of GitHub Actions to run applications build for different CPU architecture leveraging QEMU.

License

Notifications You must be signed in to change notification settings

t-katsumura/qemu-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Actions to Emulate CPU Architecture using QEMU

Sample application

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)
}

Action

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

About

An example of GitHub Actions to run applications build for different CPU architecture leveraging QEMU.

Topics

Resources

License

Stars

Watchers

Forks