Skip to content

Commit b1e2910

Browse files
committed
Enable manual workflow dispatch for build-qemu GitHub Action
- Added 'workflow_dispatch' trigger to .github/workflows/build-qemu.yml - Allows manual runs from the GitHub Actions UI in addition to push and pull request events
1 parent f706c01 commit b1e2910

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/build-qemu.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build QEMU
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-qemu:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Clone QEMU repository
17+
run: |
18+
git clone https://gitlab.com/qemu-project/qemu.git
19+
# Optionally checkout a specific version/tag
20+
cd qemu && git checkout v7.2.0
21+
22+
- name: Install build dependencies
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y build-essential ninja-build libglib2.0-dev libpixman-1-dev \
26+
libfdt-dev zlib1g-dev libsdl2-dev libspice-server-dev meson \
27+
libslirp-dev libgcrypt-dev libssh-dev python3-sphinx python3-sphinx-rtd-theme \
28+
libusb-1.0-0-dev libpulse-dev libcacard-dev libaio-dev libbluetooth-dev
29+
30+
- name: Build QEMU
31+
run: |
32+
mkdir build
33+
cd build
34+
../qemu/configure --target-list=arm-linux-user,arm-softmmu,aarch64-softmmu,aarch64-linux-user,riscv32-softmmu --enable-docs --enable-slirp --enable-gcrypt
35+
make -j 4
36+
37+
- name: Test QEMU installation
38+
run: |
39+
cd build
40+
./qemu-system-aarch64 --version
41+
./qemu-system-arm --version
42+
./qemu-system-riscv32 --version
43+
./qemu-arm --version
44+
./qemu-aarch64 --version
45+
46+
# Optional: Cache the build for future runs
47+
- name: Cache QEMU build
48+
uses: actions/cache@v3
49+
with:
50+
path: build
51+
key: ${{ runner.os }}-qemu-${{ hashFiles('qemu/**/*.c', 'qemu/**/*.h') }}

0 commit comments

Comments
 (0)