Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
24 lines
1.2 KiB
Bash
24 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
# Build the leleka-runtime test binary (the replay smoke) of THIS worktree in WSL (never on the server).
|
|
# scripts/decode-sm120/build_rt.sh TAG run from Git Bash in the worktree
|
|
# Result: WSL ~/sm120-stack/rt-TAG; copy to rnr5090:/data/leleka-e2e/sm120/rt-TAG.
|
|
set -euo pipefail
|
|
tag=${1:?tag}
|
|
root=$(git rev-parse --show-toplevel)
|
|
tar_win="$root/../wt-sm120-rt.tar"
|
|
git -C "$root" -c core.autocrlf=false ls-files -co --exclude-standard -z | tar --force-local -C "$root" --null -T - -cf "$tar_win"
|
|
w=$(cygpath -m "$tar_win"); tar_wsl="/mnt/c${w#C:}"
|
|
wsl -d Ubuntu -e bash -lc "
|
|
set -e
|
|
source ~/.cargo/env
|
|
export PATH=\$HOME/cuda-toolkits/13.2.2/bin:\$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin
|
|
rm -rf ~/sm120-src-rt && mkdir -p ~/sm120-src-rt ~/sm120-stack && tar -xf '$tar_wsl' -C ~/sm120-src-rt
|
|
cd ~/sm120-src-rt
|
|
export CARGO_TARGET_DIR=\$HOME/sm120-target-rel
|
|
nice -n 10 cargo test --no-run --locked --release -p leleka-runtime --lib > ~/sm120-stack/build-rt-$tag.log 2>&1
|
|
exe=\$(grep -o 'release/deps/leleka_runtime-[0-9a-f]*' ~/sm120-stack/build-rt-$tag.log | tail -1)
|
|
cp \$CARGO_TARGET_DIR/\$exe ~/sm120-stack/rt-$tag
|
|
sha256sum ~/sm120-stack/rt-$tag
|
|
"
|
|
rm -f "$tar_win"
|