Remote build on a sprites.dev sprite: just remote-build
CI / test (push) Failing after 17s

Syncs the tree to a sprite at the same absolute path (host-wasm/build.rs bakes the
checkout's .pixi lib dir into the host's rpath), builds host, compositor.wasm and the
panel modules there, and pulls the artifacts back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hk4tUnZsmzjbobxkwy
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-25 12:03:04 -08:00
1 parent 1f4b686087
commit 3b15248124
3 files changed
+49

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Build on a sprites.dev sprite instead of locally, then pull the artifacts back:
# build/compositor.wasm, build/components/ and host-wasm/target/release/chandra-host.
# The sprite checks the tree out at the same absolute path as here, because host-wasm/build.rs
# bakes <checkout>/.pixi/envs/default/lib into the host's rpath.
# One-off sprite setup (apt dev libs, pixi, moon, wasm-tools, moon update): scripts/sprite-setup.sh.
# scripts/remote-build.sh [just-target ...] (default: host-wasm compositor-wasm modules)
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"; cd "$ROOT"
SPRITE="${CHANDRA_SPRITE:-chandra-build}"
targets=("$@"); [ ${#targets[@]} -gt 0 ] || targets=(host-wasm compositor-wasm modules)
sp() { sprite exec -s "$SPRITE" "$@"; }
echo "== sync source to $SPRITE"
{ git ls-files -z --cached --others --exclude-standard; } | sort -zu \
| while IFS= read -r -d '' f; do [ -e "$f" ] && printf '%s\0' "$f"; done \
| tar --null -T - -cf - | sp --stdin --dir "$ROOT" -- tar xf -
echo "== build: just ${targets[*]}"
sp --no-stdin --dir "$ROOT" -- bash -c \
'export PATH=$HOME/.pixi/bin:$HOME/.moon/bin:$HOME/.local/bin:$PATH; pixi run just '"${targets[*]}"
echo "== pull artifacts"
mkdir -p build host-wasm/target/release
sp --no-stdin --dir "$ROOT" -- tar cf - build/compositor.wasm build/components host-wasm/target/release/chandra-host \
| tar xf -
ls -la build/compositor.wasm host-wasm/target/release/chandra-host