Add MoQ devcontainer verification

Switch devcontainers to Debian Trixie for the required glibc version and add automated MoQ package tests, Agent linking, and version checks through a script and VS Code task.
This commit is contained in:
Cédric Verstraeten
2026-08-05 21:07:32 +02:00
parent 8f04a6d42f
commit ff643d21ef
5 changed files with 51 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
required_glibc="2.38"
current_glibc="$(getconf GNU_LIBC_VERSION | awk '{print $2}')"
if ! dpkg --compare-versions "$current_glibc" ge "$required_glibc"; then
echo "MoQ requires glibc ${required_glibc}+; this container has ${current_glibc}." >&2
echo "Rebuild the devcontainer with the Trixie base, then run this check again." >&2
exit 1
fi
echo "==> Testing MoQ packages (glibc ${current_glibc})"
GOWORK=off go test -tags moq ./src/cloud/livemoq ./src/cloud
binary="${TMPDIR:-/tmp}/agent-moq"
trap 'rm -f "$binary"' EXIT
echo "==> Linking the MoQ Agent"
GOWORK=off go build -tags moq -o "$binary" ./main.go
echo "==> Running the linked binary"
"$binary" -action version