diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dd3596..19ef10b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -270,9 +270,38 @@ jobs: - uses: actions/setup-go@v7 with: go-version: 1.27.2 - - run: sudo apt-get update && sudo apt-get install -y qemu-user-static + # ⛔ `qemu-user-static` is a VIRTUAL package on Ubuntu 26.04, which + # `ubuntu-latest` became on 2026-10-19, and apt refuses to choose between its + # two providers: + # + # E: Package 'qemu-user-static' has no installation candidate + # + # ⚠ Installing a provider is NOT the fix: `qemu-user-binfmt` registers binfmt + # handlers, it does not ship the `qemu--static` binaries this lane + # invokes. `qemu-user` ships the dynamic `qemu-`, which is all that + # `go test -exec` needs, so both are installed and BOTH NAMES are accepted + # below. go-tex/engine#645 has the full account. + - name: install qemu user-mode emulators + timeout-minutes: 10 + run: sudo apt-get update && sudo apt-get install -y qemu-user qemu-user-binfmt - name: Test under qemu (${{ matrix.goarch }}) - run: CGO_ENABLED=0 GOARCH=${{ matrix.goarch }} go test -exec=${{ matrix.qemu }} ./... + run: | + base="${{ matrix.qemu }}" + q="" + for cand in "$base" "${base%-static}"; do + command -v "$cand" >/dev/null 2>&1 && q="$cand" && break + done + # ⛔ A missing emulator FAILS this lane. A lane that reports success for + # an architecture it never ran is the one outcome this matrix exists to + # rule out. + if [ -z "$q" ]; then + echo "::error::no qemu user emulator for ${{ matrix.goarch }} (looked for $base and ${base%-static})" + exit 1 + fi + # Printed on purpose: without it, "ran under emulation" and "skipped" are + # indistinguishable from a green tick. + echo "running ${{ matrix.goarch }} under $q" + CGO_ENABLED=0 GOARCH=${{ matrix.goarch }} go test -exec="$q" ./... # Live X11 proof: open a real window under Xvfb, present a known test # pattern, capture it and assert sampled pixels; synthesise a key + click