From fffa0070b9362cbcda4b976adced8db2f1319a64 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 8 Oct 2026 11:59:45 +0200 Subject: [PATCH] .github: move qemu-user builds to separate pipeline These builds just taking too long and slowing down all other builds. Let's only run them on a few branches (eg. baselines) and not on each single PR or arbitrary pushes. It's only running on: - master - release/* - qemu/* Signed-off-by: Enrico Weigelt, metux IT consult --- .github/workflows/build-qemu.yml | 84 +++++++++++++++++++++++++++++ .github/workflows/build-xserver.yml | 64 ---------------------- 2 files changed, 84 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/build-qemu.yml diff --git a/.github/workflows/build-qemu.yml b/.github/workflows/build-qemu.yml new file mode 100644 index 0000000000..4dab3e2590 --- /dev/null +++ b/.github/workflows/build-qemu.yml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# Copyright (C) 2026 Enrico Weigelt, metux IT consult +name: Build foreign architectures + +permissions: + contents: write + +env: + MESON_BUILDDIR: "__BUILD" + X11_PREFIX: /home/runner/x11 + X11_BUILD_DIR: /home/runner/work/xserver/xserver/WORK/sources/3rdparty + GOXPROTO_REF: v0.0.8 + +on: + push: + branches: + - master + - 'release/*' + - 'qemu/*' + +jobs: + xserver-build-qemu-user: + # Native (non-cross) build of the foreign CPU architectures referenced + # in include/compiler.h (__alpha__, __sparc__, __arm32__, __mips__, + # __powerpc__). Runs the real target-arch gcc under QEMU user-mode + # emulation (qemu-user-static + binfmt_misc + debootstrap), so the + # arch-specific inline-asm branches are genuinely compiled — the + # x86_64-host lanes never exercise them (the missing-" trailing ;" bugs + # in PR #3484/#3485 were invisible to every existing lane). + # + # ppc64el/armhf/mipsel are official Debian ports (bookworm); sparc64 + # and alpha live in debian-ports (only unstable available). + runs-on: ubuntu-latest + timeout-minutes: 180 + strategy: + fail-fast: false + matrix: + include: + - name: ppc64el # __powerpc__ (PowerPC64 little-endian) + qemu: qemu-ppc64le-static + suite: bookworm + mirror: http://deb.debian.org/debian + - name: armhf # __arm32__ (ARM 32-bit) + qemu: qemu-arm-static + suite: bookworm + mirror: http://deb.debian.org/debian + - name: mipsel # __mips__ (MIPS32 little-endian) + qemu: qemu-mipsel-static + suite: bookworm + mirror: http://deb.debian.org/debian + - name: sparc64 # __sparc__ (SPARC64) + qemu: qemu-sparc64-static + suite: unstable + mirror: http://deb.debian.org/debian-ports + - name: alpha # __alpha__ (Alpha) + qemu: qemu-alpha-static + suite: unstable + mirror: http://deb.debian.org/debian-ports + steps: + - uses: actions/checkout@v6 + + - name: QEMU cache key + id: cache-key + run: | + echo "key=qemu-rootfs-${{ matrix.name }}-${{ matrix.suite }}-${{ hashFiles('.github/scripts/qemu/run-qemu-build.sh') }}" >> $GITHUB_OUTPUT + + - name: Restore QEMU rootfs cache + id: restore-cache + uses: actions/cache/restore@v4 + with: + path: /tmp/qemu-rootfs-${{ matrix.name }} + key: ${{ steps.cache-key.outputs.key }} + + - name: QEMU user-mode native build for ${{ matrix.name }} + run: sudo --preserve-env=MESON_ARGS,FDO_CI_CONCURRENT .github/scripts/qemu/run-qemu-build.sh ${{ matrix.name }} ${{ matrix.qemu }} ${{ matrix.suite }} ${{ matrix.mirror }} + env: + MESON_ARGS: -Dprefix=/usr -Dwerror=true -Dxorg=true -Dxvfb=true -Dxnest=true -Dxephyr=true -Dxfbdev=false -Dglx=true -Dxcsecurity=true + + - name: Save QEMU rootfs cache + if: always() + uses: actions/cache/save@v4 + with: + path: /tmp/qemu-rootfs-${{ matrix.name }} + key: ${{ steps.cache-key.outputs.key }} diff --git a/.github/workflows/build-xserver.yml b/.github/workflows/build-xserver.yml index ffac65fbba..943d9cc0e3 100644 --- a/.github/workflows/build-xserver.yml +++ b/.github/workflows/build-xserver.yml @@ -1011,70 +1011,6 @@ jobs: path: | ./.github/arch/xlibre-xserver-*.tar.zst - xserver-build-qemu-user: - # Native (non-cross) build of the foreign CPU architectures referenced - # in include/compiler.h (__alpha__, __sparc__, __arm32__, __mips__, - # __powerpc__). Runs the real target-arch gcc under QEMU user-mode - # emulation (qemu-user-static + binfmt_misc + debootstrap), so the - # arch-specific inline-asm branches are genuinely compiled — the - # x86_64-host lanes never exercise them (the missing-" trailing ;" bugs - # in PR #3484/#3485 were invisible to every existing lane). - # - # ppc64el/armhf/mipsel are official Debian ports (bookworm); sparc64 - # and alpha live in debian-ports (only unstable available). - runs-on: ubuntu-latest - timeout-minutes: 180 - strategy: - fail-fast: false - matrix: - include: - - name: ppc64el # __powerpc__ (PowerPC64 little-endian) - qemu: qemu-ppc64le-static - suite: bookworm - mirror: http://deb.debian.org/debian - - name: armhf # __arm32__ (ARM 32-bit) - qemu: qemu-arm-static - suite: bookworm - mirror: http://deb.debian.org/debian - - name: mipsel # __mips__ (MIPS32 little-endian) - qemu: qemu-mipsel-static - suite: bookworm - mirror: http://deb.debian.org/debian - - name: sparc64 # __sparc__ (SPARC64) - qemu: qemu-sparc64-static - suite: unstable - mirror: http://deb.debian.org/debian-ports - - name: alpha # __alpha__ (Alpha) - qemu: qemu-alpha-static - suite: unstable - mirror: http://deb.debian.org/debian-ports - steps: - - uses: actions/checkout@v6 - - - name: QEMU cache key - id: cache-key - run: | - echo "key=qemu-rootfs-${{ matrix.name }}-${{ matrix.suite }}-${{ hashFiles('.github/scripts/qemu/run-qemu-build.sh') }}" >> $GITHUB_OUTPUT - - - name: Restore QEMU rootfs cache - id: restore-cache - uses: actions/cache/restore@v4 - with: - path: /tmp/qemu-rootfs-${{ matrix.name }} - key: ${{ steps.cache-key.outputs.key }} - - - name: QEMU user-mode native build for ${{ matrix.name }} - run: sudo --preserve-env=MESON_ARGS,FDO_CI_CONCURRENT .github/scripts/qemu/run-qemu-build.sh ${{ matrix.name }} ${{ matrix.qemu }} ${{ matrix.suite }} ${{ matrix.mirror }} - env: - MESON_ARGS: -Dprefix=/usr -Dwerror=true -Dxorg=true -Dxvfb=true -Dxnest=true -Dxephyr=true -Dxfbdev=false -Dglx=true -Dxcsecurity=true - - - name: Save QEMU rootfs cache - if: always() - uses: actions/cache/save@v4 - with: - path: /tmp/qemu-rootfs-${{ matrix.name }} - key: ${{ steps.cache-key.outputs.key }} - check-sign-off: name: Check Signed-Off-By if: github.event_name == 'pull_request'