-
Notifications
You must be signed in to change notification settings - Fork 1
120 lines (108 loc) · 3.93 KB
/
prepare-qemu-release.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Prepare QCW QEMU (from TarBall sources)
on: workflow_dispatch
env:
QEMU_VERSION: 8.2.1
MSYS: "winsymlinks:native"
jobs:
build:
runs-on: windows-latest
steps:
- name: "🏗️ Install msys2"
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
base-devel
bison
diffutils
flex
git
grep
make
sed
unzip
mingw-w64-ucrt-x86_64-binutils
mingw-w64-ucrt-x86_64-capstone
mingw-w64-ucrt-x86_64-ccache
mingw-w64-ucrt-x86_64-curl-gnutls
mingw-w64-ucrt-x86_64-cyrus-sasl
mingw-w64-ucrt-x86_64-dtc
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-glib2
mingw-w64-ucrt-x86_64-gnutls
mingw-w64-ucrt-x86_64-gtk3
mingw-w64-ucrt-x86_64-libgcrypt
mingw-w64-ucrt-x86_64-libjpeg-turbo
mingw-w64-ucrt-x86_64-libnfs
mingw-w64-ucrt-x86_64-libpng
mingw-w64-ucrt-x86_64-libslirp
mingw-w64-ucrt-x86_64-libssh
mingw-w64-ucrt-x86_64-libtasn1
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-lzo2
mingw-w64-ucrt-x86_64-meson
mingw-w64-ucrt-x86_64-nettle
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-nsis
mingw-w64-ucrt-x86_64-pixman
mingw-w64-ucrt-x86_64-pkgconf
mingw-w64-ucrt-x86_64-python
mingw-w64-ucrt-x86_64-SDL2
mingw-w64-ucrt-x86_64-SDL2_image
mingw-w64-ucrt-x86_64-snappy
mingw-w64-ucrt-x86_64-spice
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-usbredir
mingw-w64-ucrt-x86_64-virglrenderer
mingw-w64-ucrt-x86_64-zstd
- name: "🏗️ Install tools"
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install 7zip.install
- name: "📝 Configure checkout"
run: git config --global core.autocrlf input
- name: "📝 Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: "🔗 Link tools"
shell: msys2 {0}
run: |
mkdir -p /usr/local/bin
ln -sf "/c/Program Files/7-Zip/7z.exe" "/usr/local/bin/7z.exe"
- name: "📝 Fetch sources"
shell: msys2 {0}
run: |
wget -q "https://download.qemu.org/qemu-$QEMU_VERSION.tar.xz"
wget -q "https://download.qemu.org/qemu-$QEMU_VERSION.tar.xz.sig"
gpg --keyserver keys.openpgp.org --recv-key CEACC9E15534EBABB82D3FA03353C9CEF108B584
gpg "qemu-$QEMU_VERSION.tar.xz.sig"
7z x "qemu-$QEMU_VERSION.tar.xz"
7z x "qemu-$QEMU_VERSION.tar"
mv "qemu-$QEMU_VERSION" qemu-release
cd qemu-release
patch --binary -l -p 1 < ../patches/qemu/0001-9pfs-Add-9pfs-support-for-Windows-host.patch
patch --binary -l -p 1 < ../patches/qemu/0002-WHPX-Add-support-for-device-backed-memory-regions.patch
patch --binary -l -p 1 < ../patches/qemu/0003-Windows-installer-keep-dependency-cache.patch
- name: "🛠️ Build QEMU"
working-directory: qemu-release
shell: msys2 {0}
run: |
./configure --enable-gtk --enable-sdl --disable-debug-info
make
make installer
- name: "📦 Pack QEMU"
shell: msys2 {0}
run: |
mkdir -p qcw
cp qemu-release/build/qemu-setup-*.exe qcw/
cd qcw
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
cat sha.checksums
- name: "🚀 Upload artifact"
uses: actions/upload-artifact@v3
with:
name: qcw-qemu
path: qcw