-
-
Notifications
You must be signed in to change notification settings - Fork 10
64 lines (55 loc) · 1.64 KB
/
qemu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build QEMU
on:
workflow_dispatch:
inputs:
version:
required: false
type: string
default: '8.2.2'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [aarch64, x86_64]
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 }}
# --disable-gio is required with --static
./configure --static --disable-gio --target-list=${{ matrix.arch }}-softmmu
make -j$(nproc)
- name: Upload QEMU binary
uses: actions/upload-artifact@v4
with:
name: qemu-${{ matrix.arch }}
path: qemu-${{ inputs.version }}/build/qemu-system-${{ matrix.arch }}
release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download QEMU binaries
uses: actions/download-artifact@v4
- name: Publish release
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: qemu-${{ inputs.version }}-${{ github.workflow_sha }}
files: |
qemu-x86_64/qemu-system-x86_64
qemu-aarch64/qemu-system-aarch64