Skip to content

Commit 2adc767

Browse files
committed
ci: disable vhost and simplify workflow
Add --disable-vhost-net --disable-vhost-user to configure since vhost tests require kernel support unavailable in CI containers. Signed-off-by: Jason Truong <jason.truong@windriver.com>
1 parent ef5248c commit 2adc767

1 file changed

Lines changed: 48 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ci.yml, WR QEMU github CI configuration file.
22
#
3-
# Copyright (c) 2024 Wind River Systems, Inc.
3+
# Copyright (c) 2026 Wind River Systems, Inc.
44
#
55
# This program is free software; you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License version 2 as
@@ -18,6 +18,12 @@
1818
name: WR QEMU CI
1919

2020
on:
21+
workflow_dispatch:
22+
inputs:
23+
clean_build:
24+
description: 'Clear ccache for a fully clean build'
25+
type: boolean
26+
default: false
2127
push:
2228
branches:
2329
- wr-integration
@@ -35,18 +41,28 @@ jobs:
3541
repository: Wind-River/qemu
3642
path: qemu
3743
# Use a specific branch or tag if needed
38-
ref: wr-integration
44+
# ref: wr-integration
45+
46+
- name: Cache apt packages
47+
uses: actions/cache@v4
48+
with:
49+
path: ~/apt-cache
50+
key: apt-${{ runner.os }}-${{ hashFiles('qemu/.github/workflows/ci.yml') }}
51+
restore-keys: |
52+
apt-${{ runner.os }}-
3953
4054
- name: Set up dependencies
4155
run: |
56+
sudo mkdir -p ~/apt-cache
4257
sudo apt-get update
43-
sudo apt-get install -y \
58+
sudo apt-get install -y -o Dir::Cache::Archives="$HOME/apt-cache" \
4459
acpica-tools \
4560
autoconf \
4661
automake \
4762
bison \
4863
bzip2 \
4964
build-essential \
65+
ccache \
5066
cmake \
5167
curl \
5268
flex \
@@ -74,17 +90,44 @@ jobs:
7490
vsftpd \
7591
wget \
7692
zlib1g-dev
93+
94+
- name: Clear ccache (if requested)
95+
if: ${{ github.event.inputs.clean_build == 'true' }}
96+
run: ccache --clear
97+
98+
- name: Cache ccache
99+
uses: actions/cache@v4
100+
with:
101+
path: ~/.cache/ccache
102+
key: ccache-${{ runner.os }}-${{ github.sha }}
103+
restore-keys: |
104+
ccache-${{ runner.os }}-
105+
106+
- name: Configure ccache
107+
run: |
108+
ccache --set-config=max_size=1G
109+
ccache --zero-stats
77110
78111
- name: Build QEMU
79112
working-directory: qemu
80113
run: |
81-
./configure --target-list="aarch64-softmmu,x86_64-softmmu" --enable-fdt --enable-plugins --enable-slirp --enable-capstone
82-
make -j $(cat /proc/cpuinfo | grep "^processor" | wc -l)
114+
export PATH="/usr/lib/ccache:$PATH"
115+
./configure --target-list="aarch64-softmmu,x86_64-softmmu" --enable-fdt --enable-plugins --enable-slirp --enable-capstone --disable-vhost-net --disable-vhost-user
116+
make -j$(nproc)
83117
make plugins
84118
make check-build
85119
120+
- name: Print ccache stats
121+
run: ccache --show-stats
122+
86123
- name: Run QEMU tests
87124
working-directory: qemu
88125
run: |
89126
V=1 make check
90127
128+
- name: Upload test logs on failure
129+
if: failure()
130+
uses: actions/upload-artifact@v4
131+
with:
132+
name: meson-test-logs
133+
path: qemu/build/meson-logs/testlog.txt

0 commit comments

Comments
 (0)