ci fix
Some checks failed
Deploy / build-deploy (push) Failing after 3m27s

This commit is contained in:
Jorijn van der Graaf 2026-08-05 05:41:22 +02:00
commit 8603182caf
2 changed files with 19 additions and 0 deletions

View file

@ -293,6 +293,18 @@ jobs:
# --delete on content/ is safe: it is regenerated every build. Note it # --delete on content/ is safe: it is regenerated every build. Note it
# does NOT touch /deploy-app/media, which must survive. # does NOT touch /deploy-app/media, which must survive.
rsync -a --delete content/ /deploy-app/content/ rsync -a --delete content/ /deploy-app/content/
# The server links libmsquic as a SHARED lib out of crafter-build's
# external cache; the RUNPATH into that cache only exists on this
# build machine. The binary carries an $ORIGIN rpath (project.cpp),
# so the .so must travel with it. install dereferences the
# libmsquic.so.2 -> .so.2.x.y symlink into a regular file.
MSQ=$(find ~/.cache/crafter.build/external -name 'libmsquic.so.2*' -type f | head -1)
if [ -z "$MSQ" ]; then
echo "ERROR: libmsquic.so.2 not found in the external build cache." >&2
exit 1
fi
install -m 0755 "$MSQ" /deploy-app/libmsquic.so.2.new
mv -f /deploy-app/libmsquic.so.2.new /deploy-app/libmsquic.so.2
# Swap the binary into place atomically, so a request arriving mid-copy # Swap the binary into place atomically, so a request arriving mid-copy
# never hits a truncated executable. # never hits a truncated executable.
mv -f /deploy-app/catcrafts-server.new /deploy-app/catcrafts-server mv -f /deploy-app/catcrafts-server.new /deploy-app/catcrafts-server

View file

@ -134,6 +134,13 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
cfg.linkFlags.push_back("-lssl"); cfg.linkFlags.push_back("-lssl");
cfg.linkFlags.push_back("-lcrypto"); cfg.linkFlags.push_back("-lcrypto");
// libmsquic.so.2 is built in crafter-build's external cache, and the
// RUNPATH pointing there only exists on the build machine — the first
// deploy to a real host died in the loader (exit 127) because of it.
// $ORIGIN makes the loader also look next to the binary itself, and CI
// ships the .so alongside it into /srv/catcrafts-app.
cfg.linkFlags.push_back("-Wl,-rpath,$ORIGIN");
ApplyReleaseTrimming(cfg); ApplyReleaseTrimming(cfg);
return cfg; return cfg;
} }