swarm/scripts/play.sh
Brent Yorgey e227230bbb
Specifically build swarm:swarm component in play.sh script (#1682)
This seems to help with rebuild times, since we are specifically requesting to only build the `swarm` executable and not, say, the `swarm-docs` executable.
2023-12-13 20:34:43 +00:00

11 lines
502 B
Bash
Executable File

#!/bin/bash -ex
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
# This compiles without optimizations and then runs the resulting executable.
# It's been observed in certain versions of GHC that compiling with optimizations
# results in the swarm UI freezing for a potentially long time upon starting a scenario.
# See https://github.com/swarm-game/swarm/issues/1000#issuecomment-1378632269
stack build --fast swarm:swarm && stack exec swarm -- "$@"