magicciv/scripts/run
Natalie 88bdc4210a feat(dist): build-artifact Space — publish/fetch/sync fetch-or-build + RL model sharing
Build the linux .so/wasm once on a worker and let sim/test/AI runners fetch the
prebuilt artifact (keyed by git sha) instead of recompiling — N workers share
one build. Adds the magicciv-artifacts DO Space, rclone in the golden image, and:
  - dist:publish  build + upload builds/<sha>/{.so,wasm}
  - dist:fetch    download the prebuilt .so for HEAD's sha
  - dist:sync     git pull -> fetch prebuilt if published, else build
  - dist:models   share RL .onnx via the Space (push/pull/ls)
Complements sccache (compile cache) by caching final outputs. Creds via
RCLONE_S3_* env over ssh, never on worker disk/argv; degrades to build-on-worker
when creds/cache absent.

Also hardens the dispatch layer (pre-existing, affected test/build/render too):
  - pass -i ~/.ssh/id_mc_fleet on dispatch ssh (don't rely on agent-loaded key)
  - guard _dist_first_host against an empty / "fleet down" inventory
  - drop ssh -n on heredoc-stdin verbs (it redirected stdin from /dev/null)

Proven end-to-end on DO: publish built a 43.9MB .so + wasm; dist:sync fetched it
in 2.8s (no rebuild).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 06:02:33 -04:00
..
audio.sh
autoplay.sh feat(@projects/@magic-civilization): add gpu rollout parity tests & performance benchmarks 2026-04-17 12:30:50 -07:00
build-info.sh
build.sh feat(@projects): update wasm build and guide deployment workflows 2026-04-17 13:06:14 -07:00
common.sh fix(@projects/@magic-civilization): 🐛 update forgejo runner installation logic 2026-04-17 12:35:54 -07:00
deploy.sh fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
dev.sh feat(@projects/@magic-civilization): add combat system components 2026-04-26 16:08:21 -07:00
dist.sh feat(dist): build-artifact Space — publish/fetch/sync fetch-or-build + RL model sharing 2026-06-28 06:02:33 -04:00
export.sh chore(scripts): 🔧 Update and reorganize automation scripts for CI/CD workflows 2026-03-31 07:59:21 -07:00
forge.sh fix(infra): make the DO fleet actually work on real hardware + render host 2026-06-27 12:45:29 -04:00
format.sh feat(@projects/@magic-civilization): add gpu rollout parity tests & performance benchmarks 2026-04-17 12:30:50 -07:00
heavy-prefix.sh perf(player-api): Add systemd slice integration to enforce CPU/memory limits for player API workers during RL training 2026-05-26 02:21:13 -07:00
lint.sh
remote.sh fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
run
test.sh feat(@projects/@magic-civilization): add hex terrain palette system 2026-04-26 21:08:49 -07:00
tools.sh
verify.sh fix(infra): make the DO fleet actually work on real hardware + render host 2026-06-27 12:45:29 -04:00