|
| 1 | +on: push |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +jobs: |
| 8 | + checkapply: |
| 9 | + runs-on: ubuntu-24.04 |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v4 |
| 12 | + # to debug container live from GitHub |
| 13 | + # - uses: mxschmitt/action-tmate@v3 |
| 14 | + - run: bash -c '[ ! -f shazam.log ] || { cat shazam.log; exit 1; }' |
| 15 | + |
| 16 | + checkpatch-ignore-signoff: |
| 17 | + needs: checkapply |
| 18 | + runs-on: ubuntu-24.04 |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - run: git fetch -a origin --unshallow || true |
| 22 | + - run: git remote add upstream -f https://gitlab.com/qemu-project/qemu |
| 23 | + - run: ./scripts/checkpatch.pl --no-signoff $(git merge-base upstream/master HEAD)..HEAD |
| 24 | + |
| 25 | + checkpatch-with-signoff: |
| 26 | + needs: checkapply |
| 27 | + runs-on: ubuntu-24.04 |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - run: git fetch -a origin --unshallow || true |
| 31 | + - run: git remote add upstream -f https://gitlab.com/qemu-project/qemu |
| 32 | + - run: ./scripts/checkpatch.pl $(git merge-base upstream/master HEAD)..HEAD |
| 33 | + |
| 34 | + # use docker-run to not rebuild images |
| 35 | + # images are built daily and pushed on pbolinaro/qemu-ci:* |
| 36 | + build-cross: |
| 37 | + needs: checkapply |
| 38 | + runs-on: ubuntu-24.04 |
| 39 | + strategy: |
| 40 | + fail-fast: false |
| 41 | + matrix: |
| 42 | + container: [alpine,centos9,debian,debian-all-test-cross,debian-amd64-cross,debian-arm64-cross,debian-armhf-cross,debian-hexagon-cross,debian-i686-cross,debian-legacy-test-cross,debian-loongarch-cross,debian-mips64el-cross,debian-mipsel-cross,debian-ppc64el-cross,debian-riscv64-cross,debian-s390x-cross,debian-tricore-cross,fedora,fedora-rust-nightly,opensuse-leap,ubuntu2204] |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + - run: pip install meson |
| 46 | + - run: make docker-run J=$(nproc) RUNC=podman TEST=test-build IMAGE=docker.io/pbolinaro/qemu-ci:${{matrix.container}} |
| 47 | + |
| 48 | + build: |
| 49 | + needs: checkapply |
| 50 | + runs-on: ubuntu-24.04 |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + - run: > |
| 54 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 55 | + docker.io/pbolinaro/qemu-ci:debian |
| 56 | + bash -cx './configure && ninja -C build install' |
| 57 | + - run: > |
| 58 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 59 | + docker.io/pbolinaro/qemu-ci:debian |
| 60 | + ./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -d plugin |
| 61 | +
|
| 62 | + build-cross-mingw64: |
| 63 | + needs: checkapply |
| 64 | + runs-on: ubuntu-24.04 |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + - run: > |
| 68 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 69 | + docker.io/pbolinaro/qemu-ci:fedora-win64-cross |
| 70 | + bash -cx './configure $QEMU_CONFIGURE_OPTS && ninja -C build install' |
| 71 | +
|
| 72 | + build-windows: |
| 73 | + needs: checkapply |
| 74 | + runs-on: windows-2025 |
| 75 | + strategy: |
| 76 | + fail-fast: false |
| 77 | + matrix: |
| 78 | + sys: [UCRT64, CLANG64, MINGW64] |
| 79 | + defaults: |
| 80 | + run: |
| 81 | + shell: msys2 {0} |
| 82 | + steps: |
| 83 | + - uses: msys2/setup-msys2@v2 |
| 84 | + with: |
| 85 | + update: true |
| 86 | + msystem: ${{matrix.sys}} |
| 87 | + - run: pacman -S --noconfirm curl git |
| 88 | + - uses: actions/checkout@v4 |
| 89 | + - run: > |
| 90 | + pacman -S --noconfirm |
| 91 | + base-devel binutils bison diffutils flex git grep make sed |
| 92 | + ${MINGW_PACKAGE_PREFIX}-toolchain |
| 93 | + ${MINGW_PACKAGE_PREFIX}-glib2 |
| 94 | + ${MINGW_PACKAGE_PREFIX}-gtk3 |
| 95 | + ${MINGW_PACKAGE_PREFIX}-libnfs |
| 96 | + ${MINGW_PACKAGE_PREFIX}-libssh |
| 97 | + ${MINGW_PACKAGE_PREFIX}-ninja |
| 98 | + ${MINGW_PACKAGE_PREFIX}-pixman |
| 99 | + ${MINGW_PACKAGE_PREFIX}-pkgconf |
| 100 | + ${MINGW_PACKAGE_PREFIX}-python |
| 101 | + ${MINGW_PACKAGE_PREFIX}-SDL2 |
| 102 | + ${MINGW_PACKAGE_PREFIX}-zstd |
| 103 | + - run: ./configure && ninja -C build |
| 104 | + - run: ./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -d plugin |
| 105 | + |
| 106 | + build-macos-x86_64: |
| 107 | + needs: checkapply |
| 108 | + runs-on: macos-13 |
| 109 | + steps: |
| 110 | + - uses: actions/checkout@v4 |
| 111 | + - run: brew install --quiet $(brew deps --include-build qemu) || true |
| 112 | + # on macos, werror is not on by default |
| 113 | + - run: ./configure --enable-werror && ninja -C build |
| 114 | + - run: ./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -d plugin |
| 115 | + |
| 116 | + build-macos-aarch64: |
| 117 | + needs: checkapply |
| 118 | + runs-on: macos-14 |
| 119 | + steps: |
| 120 | + - uses: actions/checkout@v4 |
| 121 | + - run: brew install --quiet $(brew deps --include-build qemu) || true |
| 122 | + # on macos, werror is not on by default |
| 123 | + - run: ./configure --enable-werror && ninja -C build |
| 124 | + - run: ./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -d plugin |
| 125 | + |
| 126 | + build-misc: |
| 127 | + needs: checkapply |
| 128 | + runs-on: ubuntu-24.04 |
| 129 | + steps: |
| 130 | + - uses: actions/checkout@v4 |
| 131 | + - run: > |
| 132 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 133 | + docker.io/pbolinaro/qemu-ci:debian |
| 134 | + bash -cx './configure --disable-user --disable-system --enable-docs --enable-tools && ninja -C build install' |
| 135 | +
|
| 136 | + build-32bits: |
| 137 | + needs: checkapply |
| 138 | + runs-on: ubuntu-24.04 |
| 139 | + steps: |
| 140 | + - uses: actions/checkout@v4 |
| 141 | + - run: > |
| 142 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 143 | + docker.io/pbolinaro/qemu-ci:debian-i686-cross |
| 144 | + bash -cx './configure $QEMU_CONFIGURE_OPTS && ninja -C build install' |
| 145 | +
|
| 146 | + build-big-endian: |
| 147 | + needs: checkapply |
| 148 | + runs-on: ubuntu-24.04 |
| 149 | + steps: |
| 150 | + - uses: actions/checkout@v4 |
| 151 | + - run: > |
| 152 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 153 | + docker.io/pbolinaro/qemu-ci:debian-s390x-cross |
| 154 | + bash -cx './configure $QEMU_CONFIGURE_OPTS && ninja -C build install' |
| 155 | +
|
| 156 | + build-debug: |
| 157 | + needs: checkapply |
| 158 | + runs-on: ubuntu-24.04 |
| 159 | + steps: |
| 160 | + - uses: actions/checkout@v4 |
| 161 | + - run: > |
| 162 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 163 | + docker.io/pbolinaro/qemu-ci:debian |
| 164 | + bash -cx './configure --enable-debug --enable-asan --enable-ubsan && ninja -C build install' |
| 165 | + - run: > |
| 166 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 167 | + docker.io/pbolinaro/qemu-ci:debian |
| 168 | + ./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -d plugin |
| 169 | +
|
| 170 | + build-static: |
| 171 | + needs: checkapply |
| 172 | + runs-on: ubuntu-24.04 |
| 173 | + steps: |
| 174 | + - uses: actions/checkout@v4 |
| 175 | + - run: > |
| 176 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 177 | + docker.io/pbolinaro/qemu-ci:debian |
| 178 | + bash -cx './configure --disable-system --disable-tools --disable-guest-agent --disable-docs --static && ninja -C build install' |
| 179 | +
|
| 180 | + build-tsan: |
| 181 | + needs: checkapply |
| 182 | + runs-on: ubuntu-24.04 |
| 183 | + steps: |
| 184 | + - uses: actions/checkout@v4 |
| 185 | + - run: > |
| 186 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 187 | + docker.io/pbolinaro/qemu-ci:debian |
| 188 | + bash -cx './configure --enable-tsan && ninja -C build install' |
| 189 | +
|
| 190 | + build-clang: |
| 191 | + needs: checkapply |
| 192 | + runs-on: ubuntu-24.04 |
| 193 | + steps: |
| 194 | + - uses: actions/checkout@v4 |
| 195 | + - run: > |
| 196 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 197 | + docker.io/pbolinaro/qemu-ci:debian |
| 198 | + bash -cx './configure --cxx=clang++ --cc=clang --host-cc=clang && ninja -C build install' |
| 199 | +
|
| 200 | + build-clang-latest: |
| 201 | + needs: checkapply |
| 202 | + runs-on: ubuntu-24.04 |
| 203 | + steps: |
| 204 | + - uses: actions/checkout@v4 |
| 205 | + - run: > |
| 206 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 207 | + docker.io/pbolinaro/qemu-ci:debian |
| 208 | + bash -cx 'LLVM_VERSION=19 && apt update && apt install -y lsb-release wget software-properties-common gnupg && wget https://apt.llvm.org/llvm.sh && bash llvm.sh ${LLVM_VERSION} && ./configure --cxx=clang++-${LLVM_VERSION} --cc=clang-${LLVM_VERSION} --host-cc=clang-${LLVM_VERSION} && ninja -C build install' |
| 209 | +
|
| 210 | + build-rust: |
| 211 | + needs: checkapply |
| 212 | + runs-on: ubuntu-24.04 |
| 213 | + steps: |
| 214 | + - uses: actions/checkout@v4 |
| 215 | + - run: > |
| 216 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 217 | + docker.io/pbolinaro/qemu-ci:debian |
| 218 | + bash -cx './configure --enable-rust && ninja -C build install' |
| 219 | +
|
| 220 | + build-disable-tcg: |
| 221 | + needs: checkapply |
| 222 | + runs-on: ubuntu-24.04 |
| 223 | + steps: |
| 224 | + - uses: actions/checkout@v4 |
| 225 | + - run: > |
| 226 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 227 | + docker.io/pbolinaro/qemu-ci:debian |
| 228 | + bash -cx './configure --disable-tcg && ninja -C build install' |
| 229 | +
|
| 230 | + build-disable-kvm: |
| 231 | + needs: checkapply |
| 232 | + runs-on: ubuntu-24.04 |
| 233 | + steps: |
| 234 | + - uses: actions/checkout@v4 |
| 235 | + - run: > |
| 236 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 237 | + docker.io/pbolinaro/qemu-ci:debian |
| 238 | + bash -cx './configure --disable-kvm && ninja -C build install' |
| 239 | +
|
| 240 | + build-disable-tcg-kvm-for-xen: |
| 241 | + needs: checkapply |
| 242 | + runs-on: ubuntu-24.04 |
| 243 | + steps: |
| 244 | + - uses: actions/checkout@v4 |
| 245 | + - run: > |
| 246 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 247 | + docker.io/pbolinaro/qemu-ci:debian |
| 248 | + bash -cx './configure --disable-tcg --disable-kvm && ninja -C build install' |
| 249 | +
|
| 250 | + build-minimal: |
| 251 | + needs: checkapply |
| 252 | + runs-on: ubuntu-24.04 |
| 253 | + steps: |
| 254 | + - uses: actions/checkout@v4 |
| 255 | + - run: > |
| 256 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 257 | + docker.io/pbolinaro/qemu-ci:debian |
| 258 | + bash -cx './configure --without-default-features --without-default-devices --disable-kvm --disable-tcg && ninja -C build install' |
| 259 | +
|
| 260 | + check-tcg: |
| 261 | + needs: checkapply |
| 262 | + runs-on: ubuntu-24.04 |
| 263 | + steps: |
| 264 | + - uses: actions/checkout@v4 |
| 265 | + - run: > |
| 266 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 267 | + docker.io/pbolinaro/qemu-ci:debian-all-test-cross |
| 268 | + bash -cx './configure --disable-docs --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex --enable-asan --enable-ubsan && ninja -C build' |
| 269 | + - run: > |
| 270 | + podman run --init --privileged --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 271 | + docker.io/pbolinaro/qemu-ci:debian-all-test-cross |
| 272 | + bash -cx "env ASAN_OPTIONS=detect_leaks=0 make -k -j $(nproc) check-tcg" |
| 273 | +
|
| 274 | + # run all meson tests, except functional. |
| 275 | + # block tests are not ran because they don't support sanitizers: |
| 276 | + # https://gitlab.com/qemu-project/qemu/-/blob/master/tests/qemu-iotests/meson.build |
| 277 | + check: |
| 278 | + needs: checkapply |
| 279 | + runs-on: ubuntu-24.04 |
| 280 | + steps: |
| 281 | + - uses: actions/checkout@v4 |
| 282 | + # we use image with download cache filled. Solves servers flakiness. |
| 283 | + - run: > |
| 284 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 285 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 286 | + bash -cx './configure --disable-docs --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex --enable-asan --enable-ubsan && ninja -C build' |
| 287 | + - run: sudo chown $USER:$USER /dev/kvm |
| 288 | + - run: > |
| 289 | + podman run --init --privileged --rm -i -v /dev/kvm:/dev/kvm -v $(pwd):$(pwd) -w $(pwd) |
| 290 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 291 | + bash -cx "env ASAN_OPTIONS=detect_leaks=0 ./build/pyvenv/bin/meson test -C build --setup thorough --no-suite func-quick --no-suite func-thorough -t 5 --print-errorlogs" |
| 292 | +
|
| 293 | + check-functional: |
| 294 | + needs: checkapply |
| 295 | + runs-on: ubuntu-24.04 |
| 296 | + steps: |
| 297 | + # we clean up runner first, to get more disk space |
| 298 | + - run: docker system prune -af && sudo rm -rf /opt/* |
| 299 | + - uses: actions/checkout@v4 |
| 300 | + # we use image with download cache filled. Solves servers flakiness. |
| 301 | + - run: > |
| 302 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 303 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 304 | + bash -cx './configure --disable-docs --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex --enable-asan --enable-ubsan && ninja -C build' |
| 305 | + - run: sudo chown $USER:$USER /dev/kvm |
| 306 | + - run: > |
| 307 | + podman run --init --privileged --rm -i -v /dev/kvm:/dev/kvm -v $(pwd):$(pwd) -w $(pwd) |
| 308 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 309 | + bash -cx "env ASAN_OPTIONS=detect_leaks=0 ./build/pyvenv/bin/meson test -C build --setup thorough --suite func-quick --suite func-thorough -j $(($(nproc) / 2)) -t 5 --print-errorlogs --wrapper $(pwd)/scripts/run-functional-test.sh --max-lines=0" |
| 310 | + # Limit parallelism because it creates timeout. |
| 311 | +
|
| 312 | + # iotests do not support sanitizers, so we run them in their own job |
| 313 | + check-block: |
| 314 | + needs: checkapply |
| 315 | + runs-on: ubuntu-24.04 |
| 316 | + steps: |
| 317 | + - uses: actions/checkout@v4 |
| 318 | + # we use image with download cache filled. Solves servers flakiness. |
| 319 | + - run: > |
| 320 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 321 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 322 | + bash -cx './configure --disable-docs --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex && ninja -C build' |
| 323 | + - run: sudo chown $USER:$USER /dev/kvm |
| 324 | + - run: > |
| 325 | + podman run --init --privileged --rm -i -v /dev/kvm:/dev/kvm -v $(pwd):$(pwd) -w $(pwd) |
| 326 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 327 | + bash -cx "./build/pyvenv/bin/meson test -C build --setup thorough --suite block --suite block-slow --suite block-thorough -t 5 --print-errorlogs" |
| 328 | +
|
| 329 | + check-avocado: |
| 330 | + needs: checkapply |
| 331 | + runs-on: ubuntu-24.04 |
| 332 | + steps: |
| 333 | + - uses: actions/checkout@v4 |
| 334 | + # add more time for all tests |
| 335 | + - run: sed -i -e 's/timeout = .*/timeout = 3600/' $(find tests/avocado/ -type f) |
| 336 | + # we use image with download cache filled. Solves servers flakiness. |
| 337 | + - run: > |
| 338 | + podman run --init --rm -it -v $(pwd):$(pwd) -w $(pwd) |
| 339 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 340 | + bash -cx './configure --disable-docs --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex --enable-asan --enable-ubsan && ninja -C build' |
| 341 | + - run: sudo chown $USER:$USER /dev/kvm |
| 342 | + - run: > |
| 343 | + podman run --init --privileged --rm -it -v /dev/kvm:/dev/kvm -v $(pwd):$(pwd) -w $(pwd) |
| 344 | + docker.io/pbolinaro/qemu-ci:debian-precache-tests |
| 345 | + bash -cx "env ASAN_OPTIONS=detect_leaks=0 make -k check-avocado V=1" |
0 commit comments