feat(@projects/@magic-civilization): ✨ add local batch gdextension rebuild logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
2e2846a2ef
commit
c0512c1fb5
1 changed files with 13 additions and 0 deletions
|
|
@ -140,6 +140,19 @@ echo "Parallel: $PARALLEL concurrent seed(s)"
|
|||
echo "Safety timeout: ${SAFETY_TIMEOUT}s per game"
|
||||
echo "============================================================"
|
||||
|
||||
# p1-45: Rebuild GDExtension before every local batch so the .so is never stale.
|
||||
# Remote mode delegates to run_ap3.sh on the remote host, which is expected to
|
||||
# have a fresh build already (or the caller ran build-gdext.sh manually).
|
||||
# Uses a timestamped CARGO_TARGET_DIR to avoid collisions on multi-tenant hosts.
|
||||
if [ -z "$AUTOPLAY_HOST" ]; then
|
||||
echo "--- p1-45: rebuilding GDExtension before batch (CARGO_TARGET_DIR isolation) ---"
|
||||
MC_BUILD_STAMP="$(date +%s)"
|
||||
export CARGO_TARGET_DIR="/tmp/mc-build-${MC_BUILD_STAMP}/target"
|
||||
(cd "$PROJECT_DIR/src/simulator" && bash build-gdext.sh)
|
||||
unset CARGO_TARGET_DIR
|
||||
echo "--- GDExtension rebuild complete ---"
|
||||
fi
|
||||
|
||||
# Start the MCTS service (idempotent — no-op if already running).
|
||||
# Runs only for local batches; remote batches rely on the remote host's
|
||||
# run-services.sh invocation (or service already running on apricot).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue