Skip to content

Build QEMU

Build QEMU #9

Workflow file for this run

name: Build QEMU
on:
workflow_dispatch:
inputs:
version:
required: false
type: string
default: '8.2.2'
arch:
required: false
type: choice
options:
- 'x86_64'
- 'aarch64'
default: 'x86_64'
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt install -y libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
- name: Cache QEMU source
id: cache
uses: actions/cache@v4
with:
path: qemu-${{ inputs.version }}
key: qemu-${{ inputs.version }}
- name: Download QEMU source
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget --no-verbose https://download.qemu.org/qemu-${{ inputs.version }}.tar.xz
tar -xf qemu-${{ inputs.version }}.tar.xz
- name: Build QEMU
run: |
cd qemu-${{ inputs.version }}
./configure --target-list=${{ inputs.arch }}-softmmu
make -j$(nproc)
- name: Publish release
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: qemu-${{ inputs.arch }}-${{ inputs.version }}-${{ github.workflow_sha }}
files: qemu-${{ inputs.version }}/build/qemu-system-${{ inputs.arch }}