mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-26 01:59:57 +00:00
Retries in this lane are decided by the step outcome, but
vmactions/dragonflybsd-vm does not report the exit code of the command it runs
over SSH. A lane that never finished therefore reports success, and the retry
chain stops on that success instead of recovering.
The build itself is fine. A run that reported success, in full:
meson install -> intro-install_plan.json, install.dat written
compile -> ccache "total size is 237,948,165 speedup is 1.14"
objects -> _build/test/tests.p/*.c.o
Note that a successful lane prints no "Compiling C" lines at all: ccache
satisfies every translation from cache and ninja stays silent. Counting those
lines is therefore useless as a build signal - it reads zero on a lane that
built successfully, and that is what made the problem look like a build that
never started.
run-xserver-build.sh now writes /tmp/xsbuild-started once the guest is alive
and /tmp/xsbuild-complete after 'meson install', both carrying $GITHUB_SHA,
and removes them on entry. The retry conditions key off those files:
started missing -> guest never ran the build, retry
started, complete missing -> build ran and broke, stop retrying
complete present -> done
GITHUB_SHA is added to the envs of the three VM steps for exactly this: the
action forwards only what envs lists, so without it the marker is written
empty and the comparison below has nothing to compare against. The final
"verify the build actually ran" step is a plain run step and stays the single
decisive one; the two intermediate checks carry continue-on-error because an
if: without a status check function is evaluated under an implicit success(),
and a failing check would otherwise skip every retry.
Scope: DragonFlyBSD only. freebsd shows the same signature and is still
unverified; openbsd, netbsd and solaris have not been examined at all.
alpine, gentoo and rhel run natively and need none of this.
Verified locally before pushing: workflow parses, script passes sh -n, and the
netbsd/openbsd/solaris/freebsd jobs are byte-identical to master.
Signed-off-by: Enterprise <info@metux.net>
40 lines
1.6 KiB
Shell
Executable file
40 lines
1.6 KiB
Shell
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
# Copyright (C) 2026 Enrico Weigelt, metux IT consult <info@metux.net>
|
|
|
|
set -e
|
|
|
|
# Proof-of-life markers for the CI lane, see "verify the build actually ran"
|
|
# in .github/workflows/build-xserver.yml. vmactions/dragonflybsd-vm loses the
|
|
# exit code of the command it runs over SSH, so a step that never completed
|
|
# still reports success; the workflow therefore gates on these files instead
|
|
# of on the step outcome. Both carry $GITHUB_SHA so a marker from an earlier
|
|
# attempt cannot vouch for a later one - which is why GITHUB_SHA has to be
|
|
# listed in the workflow step's envs.
|
|
XSBUILD_STARTED=/tmp/xsbuild-started
|
|
XSBUILD_COMPLETE=/tmp/xsbuild-complete
|
|
rm -f "$XSBUILD_STARTED" "$XSBUILD_COMPLETE"
|
|
|
|
./.github/scripts/DragonFlyBSD/install-pkg.sh
|
|
|
|
echo "--> running xserver build ...."
|
|
export MESON_BUILDDIR=_build
|
|
|
|
CFLAGS="$CFLAGS -Wno-typedef-redefinition"
|
|
|
|
# Written once the guest is alive and this script is running. If this is
|
|
# missing, the build never started.
|
|
echo "$GITHUB_SHA" > "$XSBUILD_STARTED"
|
|
|
|
rm -rf "$MESON_BUILDDIR"
|
|
meson setup "$MESON_BUILDDIR" $MESON_ARGS
|
|
meson configure "$MESON_BUILDDIR"
|
|
meson compile -v -C "$MESON_BUILDDIR" $jobcount $ninja_args
|
|
# tests not working yet
|
|
# meson test -C "$MESON_BUILDDIR" --print-errorlogs $MESON_TEST_ARGS
|
|
meson install --no-rebuild -C "$MESON_BUILDDIR" $MESON_INSTALL_ARGS
|
|
# making trouble w/ git tree copied into the VM
|
|
# meson dist -C "$MESON_BUILDDIR" $MESON_DIST_ARGS
|
|
|
|
# Written last: present only if the build ran to completion.
|
|
echo "$GITHUB_SHA" > "$XSBUILD_COMPLETE"
|