From c62e9d70fea8ae2a04d9780bf2f68ab6c8d6bf6b Mon Sep 17 00:00:00 2001 From: bjarneo Date: Sun, 27 Sep 2026 08:50:59 +0200 Subject: [PATCH] Upload meson test logs when a package build fails (#661) makepkg runs check() inside the build container and meson writes each test's output to the build tree, not to stdout. A failing test therefore leaves only a summary line in the job log. Diagnosing it means reading the package source and inferring the cause. bin/build bind-mounts $SRC_DIR at /src, so the logs outlive the container at src/**/meson-logs/ on the runner. Upload them when the build step fails. owe 0.2.7 showed the cost: owe:transition failed on aarch64 and passed on x86_64, and CI carried no record of which assertion tripped. Co-authored-by: Bjarne Oeverli <1419214+bjarneo@users.noreply.github.com> --- .github/workflows/build-pr.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index ab0bec4..591e3ac 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -192,6 +192,19 @@ jobs: env: CONTAINER_ENGINE: docker run: bin/build --mirror edge --arch ${{ matrix.arch }} --package ${{ matrix.package }} + # makepkg's check() leaves meson's per-test output in the build tree, + # never on stdout, so a failing test shows only a summary line in this + # job log. bin/build bind-mounts $SRC_DIR at /src, so those logs outlive + # the container. Without this upload an arch-specific test failure + # cannot be diagnosed from CI at all (seen on owe 0.2.7, aarch64). + - name: Upload test logs + if: always() && steps.build.outcome == 'failure' + uses: actions/upload-artifact@v4 + with: + name: test-logs-${{ matrix.package }}-${{ matrix.arch }} + path: src/**/meson-logs/ + if-no-files-found: ignore + retention-days: 14 # The artifact label carries the package directory's git tree hash so # the publish step can find the build for exactly the tree that merged. # The package file inside keeps makepkg's standard name untouched.