Files
CHOMPStation2/tools/ci/compile_and_run.sh
2025-08-12 08:46:46 +02:00

34 lines
931 B
Bash
Executable File

#!/bin/bash
RED='\033[0;31m'
NC='\033[0m'
source $HOME/BYOND/byond/bin/byondsetup
# Clean up between steps so Juke doesn't refuse to recompile with different -D options
rm vorestation.dmb
# Copy example configs
cp config/example/* config/
# Create spritesheet directory
mkdir -p data/spritesheets
# Compile a copy of the codebase, and print errors as Github Actions annotations
tools/build/build.sh --ci dm -DCIBUILDING -DCITESTING ${EXTRA_ARGS}
exitVal=$?
# Compile failed on map_test
if [ $exitVal -gt 0 ]; then
echo "${RED}Errors were produced during CI with arguments ${EXTRA_ARGS}, please review CI logs.${NC}"
exit 1
fi
# This variable is set in the CI scripts depending if we need to run the codebase or not.
# Extra map tests for example have it set to false
if [ $RUN -eq 1 ];
then
DreamDaemon vorestation.dmb -close -invisible -trusted -verbose -params "log-directory=ci"
cat data/logs/ci/clean_run.lk
fi