File tree 1 file changed +66
-0
lines changed
1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build QEMU
2
+ on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ version :
6
+ required : false
7
+ type : string
8
+ default : ' 8.2.2'
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ arch : [aarch64, x86_64]
16
+ steps :
17
+
18
+ - name : Install dependencies
19
+ run : sudo apt install -y libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build libslirp-dev
20
+
21
+ - name : Cache QEMU source
22
+ id : cache
23
+ uses : actions/cache@v4
24
+ with :
25
+ path : qemu-${{ inputs.version }}
26
+ key : qemu-${{ inputs.version }}
27
+
28
+ - name : Download QEMU source
29
+ if : steps.cache.outputs.cache-hit != 'true'
30
+ run : |
31
+ wget --no-verbose https://download.qemu.org/qemu-${{ inputs.version }}.tar.xz
32
+ tar -xf qemu-${{ inputs.version }}.tar.xz
33
+
34
+ - name : Build QEMU
35
+ run : |
36
+ cd qemu-${{ inputs.version }}
37
+ ./configure --enable-slirp --target-list=${{ matrix.arch }}-softmmu
38
+ make -j$(nproc)
39
+
40
+ strip build/qemu-system-${{ matrix.arch }}
41
+
42
+ - name : Upload QEMU binary
43
+ uses : actions/upload-artifact@v4
44
+ with :
45
+ name : qemu-${{ matrix.arch }}
46
+ path : |
47
+ qemu-${{ inputs.version }}/build/qemu-system-${{ matrix.arch }}
48
+
49
+ release :
50
+ runs-on : ubuntu-latest
51
+ needs : build
52
+ permissions :
53
+ contents : write
54
+ steps :
55
+
56
+ - name : Download QEMU binaries
57
+ uses : actions/download-artifact@v4
58
+
59
+ - name : Publish release
60
+ uses : softprops/action-gh-release@v2
61
+ with :
62
+ prerelease : true
63
+ tag_name : qemu-${{ inputs.version }}-${{ github.workflow_sha }}
64
+ files : |
65
+ qemu-x86_64/qemu-system-x86_64
66
+ qemu-aarch64/qemu-system-aarch64
You can’t perform that action at this time.
0 commit comments