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:
1 parent
1f4b686087
commit
3b15248124
3 files changed
+49
No files matched your search
@@ -103,6 +103,10 @@ uninstall-session:
|
|||||||
client *cmd="foot":
|
client *cmd="foot":
|
||||||
WAYLAND_DISPLAY={{socket}} {{cmd}}
|
WAYLAND_DISPLAY={{socket}} {{cmd}}
|
||||||
|
|
||||||
|
# Build host + wasm compositor + modules on a sprites.dev sprite (CHANDRA_SPRITE, default chandra-build) and pull the artifacts back.
|
||||||
|
remote-build *targets:
|
||||||
|
scripts/remote-build.sh {{targets}}
|
||||||
|
|
||||||
# Compositor + wasm component + lib tests.
|
# Compositor + wasm component + lib tests.
|
||||||
test: modules
|
test: modules
|
||||||
XDG_CONFIG_HOME="$(mktemp -d)" CHANDRA_TEST_CONFIG=1 moon test --target native --warn-list -a compositor/renderer compositor/wasm compositor/host
|
XDG_CONFIG_HOME="$(mktemp -d)" CHANDRA_TEST_CONFIG=1 moon test --target native --warn-list -a compositor/renderer compositor/wasm compositor/host
|
||||||
|
|||||||
Executable
+27
@@ -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
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# One-off setup of the build sprite used by scripts/remote-build.sh (Ubuntu sprite): dev libs, pixi, moon, wasm-tools.
|
||||||
|
# Run on the sprite: sprite exec -s chandra-build --no-stdin --file scripts/sprite-setup.sh:/tmp/sprite-setup.sh -- bash /tmp/sprite-setup.sh
|
||||||
|
# Then once: sprite exec -s chandra-build --no-stdin -- bash -c '~/.moon/bin/moon update'
|
||||||
|
set -euo pipefail
|
||||||
|
sudo mkdir -p /home/nandi/Projects/chandra && sudo chown -R sprite:sprite /home/nandi
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq libdrm-dev libinput-dev libxkbcommon-dev libudev-dev libseat-dev pkg-config xz-utils unzip >/dev/null
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
# pixi
|
||||||
|
curl -fsSL https://pixi.sh/install.sh | PIXI_VERSION=v0.84.2 PIXI_NO_PATH_UPDATE=1 sh >/dev/null 2>&1 || true
|
||||||
|
# wasm-tools prebuilt
|
||||||
|
curl -fsSL https://github.com/bytecodealliance/wasm-tools/releases/download/v1.258.0/wasm-tools-1.258.0-x86_64-linux.tar.gz | tar xz -C /tmp
|
||||||
|
install /tmp/wasm-tools-1.258.0-x86_64-linux/wasm-tools ~/.local/bin/
|
||||||
|
# moon
|
||||||
|
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash >/dev/null 2>&1 || true
|
||||||
|
export PATH=$HOME/.pixi/bin:$HOME/.moon/bin:$HOME/.local/bin:$PATH
|
||||||
|
pixi -V; wasm-tools -V; moon version | head -1; cargo -V; ls /usr/include/libseat.h
|
||||||
Reference in new issue
Block a user