chore: standardize Nim builds to out/ subdir, simplify .gitignore
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-7
@@ -22,14 +22,8 @@ __pycache__/
|
|||||||
devbox.json
|
devbox.json
|
||||||
devbox.lock
|
devbox.lock
|
||||||
|
|
||||||
# Compiled bot binaries and output directories
|
# Compiled bot binaries — all builds go to *_garage/out/
|
||||||
# Nim compiles to bot root (executable, no extension) and to out/ subdirectories
|
|
||||||
*_garage/out/
|
*_garage/out/
|
||||||
GotoTest_garage/GotoTest
|
|
||||||
OscillatorBot_garage/OscillatorBot
|
|
||||||
PPO_Bot_garage/PPO_Bot
|
|
||||||
QBot_garage/QBot
|
|
||||||
SAC_LSTM_Bot_garage/SAC_LSTM_Bot
|
|
||||||
|
|
||||||
# Java compiled classes
|
# Java compiled classes
|
||||||
*.class
|
*.class
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +1,4 @@
|
|||||||
|
switch("outdir", "out")
|
||||||
# begin Nimble config (version 2)
|
# begin Nimble config (version 2)
|
||||||
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
||||||
include "nimble.paths"
|
include "nimble.paths"
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
exec ./OscillatorBot 2>> /tmp/oscillatorbot_stderr.log
|
exec ./out/OscillatorBot 2>> /tmp/oscillatorbot_stderr.log
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
--path:"../common_libs"
|
--path:"../common_libs"
|
||||||
|
switch("outdir", "out")
|
||||||
|
|||||||
Binary file not shown.
@@ -4,4 +4,4 @@
|
|||||||
# which deadlock when called from within a multi-threaded Nim bot process.
|
# which deadlock when called from within a multi-threaded Nim bot process.
|
||||||
export OPENBLAS_NUM_THREADS=1
|
export OPENBLAS_NUM_THREADS=1
|
||||||
cd -- "$(dirname -- "$0")"
|
cd -- "$(dirname -- "$0")"
|
||||||
exec "./PPO_Bot"
|
exec "./out/PPO_Bot"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
# ponytail: adjust path per machine, or use pkg-config
|
# ponytail: adjust path per machine, or use pkg-config
|
||||||
switch("passL", "-L/nix/store/v07svn2y92bvzjl51aj7c9ca1cwg7rw7-openblas-0.3.32/lib -lopenblas")
|
switch("passL", "-L/nix/store/v07svn2y92bvzjl51aj7c9ca1cwg7rw7-openblas-0.3.32/lib -lopenblas")
|
||||||
switch("threads", "on")
|
switch("threads", "on")
|
||||||
|
switch("outdir", "out")
|
||||||
# begin Nimble config (version 2)
|
# begin Nimble config (version 2)
|
||||||
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
||||||
include "nimble.paths"
|
include "nimble.paths"
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
exec ./QBot 2>> /tmp/qbot_stderr.log
|
exec ./out/QBot 2>> /tmp/qbot_stderr.log
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
--path:"../common_libs"
|
--path:"../common_libs"
|
||||||
|
switch("outdir", "out")
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Launch config for tools/training_runner/RunTraining.java (#49): the runner
|
# Launch config for tools/training_runner/RunTraining.java (#49): the runner
|
||||||
# executes <json-basename>.sh inside the bot dir (sample-bots convention).
|
# executes <json-basename>.sh inside the bot dir (sample-bots convention).
|
||||||
exec "$(dirname "$0")/SAC_LSTM_Bot"
|
exec "$(dirname "$0")/out/SAC_LSTM_Bot"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ switch("passL", "-L/nix/store/v07svn2y92bvzjl51aj7c9ca1cwg7rw7-openblas-0.3.32/l
|
|||||||
# ponytail: nix store path; adjust per machine, or use pkg-config
|
# ponytail: nix store path; adjust per machine, or use pkg-config
|
||||||
switch("passL", "-L/nix/store/wqvz31s598bvj3zb747943xhl38hjc6h-libzip-1.11.4/lib -lzip")
|
switch("passL", "-L/nix/store/wqvz31s598bvj3zb747943xhl38hjc6h-libzip-1.11.4/lib -lzip")
|
||||||
switch("threads", "on")
|
switch("threads", "on")
|
||||||
|
switch("outdir", "out")
|
||||||
# Submodules import each other as SAC_LSTM_Bot/<mod>; make that resolvable for
|
# Submodules import each other as SAC_LSTM_Bot/<mod>; make that resolvable for
|
||||||
# the binary build too (tests already add ../src via tests/config.nims).
|
# the binary build too (tests already add ../src via tests/config.nims).
|
||||||
switch("path", thisDir() & "/src")
|
switch("path", thisDir() & "/src")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
TARGET="${1:-${SAMPLE_BOTS_DIR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive}}/SacTwin"
|
TARGET="${1:-${SAMPLE_BOTS_DIR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive}}/SacTwin"
|
||||||
BIN="$SCRIPT_DIR/SAC_LSTM_Bot" # nimble build -d:release output
|
BIN="$SCRIPT_DIR/out/SAC_LSTM_Bot" # nimble build -d:release output (out/ subdir)
|
||||||
SEED="$SCRIPT_DIR/weights/sac_best.zip" # frozen baseline
|
SEED="$SCRIPT_DIR/weights/sac_best.zip" # frozen baseline
|
||||||
|
|
||||||
[ -x "$BIN" ] || { echo ">>> $BIN missing — run 'nimble build -d:release' first"; exit 1; }
|
[ -x "$BIN" ] || { echo ">>> $BIN missing — run 'nimble build -d:release' first"; exit 1; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export PPO_BOT_DIR="$PPO_BOT_SRC"
|
|||||||
export SAMPLE_BOTS_DIR="${SAMPLE_BOTS_DIR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive}"
|
export SAMPLE_BOTS_DIR="${SAMPLE_BOTS_DIR:-/home/davide/Projects/tank-royale/sample-bots/java/build/archive}"
|
||||||
|
|
||||||
# ── 1. Compile PPO_Bot if binary is missing ──────────────────────────────────
|
# ── 1. Compile PPO_Bot if binary is missing ──────────────────────────────────
|
||||||
if [ ! -x "$PPO_BOT_SRC/PPO_Bot" ]; then
|
if [ ! -x "$PPO_BOT_SRC/out/PPO_Bot" ]; then
|
||||||
echo ">>> Compiling PPO_Bot..."
|
echo ">>> Compiling PPO_Bot..."
|
||||||
(cd "$PPO_BOT_SRC" && nimble build -d:release)
|
(cd "$PPO_BOT_SRC" && nimble build -d:release)
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user