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>
This commit is contained in:
1 parent
592c85c476
commit
c62e9d70fe
1 file changed
+13
@@ -192,6 +192,19 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CONTAINER_ENGINE: docker
|
CONTAINER_ENGINE: docker
|
||||||
run: bin/build --mirror edge --arch ${{ matrix.arch }} --package ${{ matrix.package }}
|
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 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 publish step can find the build for exactly the tree that merged.
|
||||||
# The package file inside keeps makepkg's standard name untouched.
|
# The package file inside keeps makepkg's standard name untouched.
|
||||||
|
|||||||
Reference in new issue
Block a user