Files
CHOMPStation2/tools/ci/compile_and_run.sh
CHOMPStation2StaffMirrorBot 26ff936832 [MIRROR] Updates librust_g.so (#9968)
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-01-29 09:52:15 +01:00

35 lines
909 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 --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
# If we're running, run
# YW Edit removes "|| exit 1" until we can fix our submaps
if [ $RUN -eq 1 ];
then
DreamDaemon $BASENAME.dmb -close -trusted -invisible -verbose -core 2>&1 | tee log.txt;
grep "All Unit Tests Passed" log.txt
grep "Caught 0 Runtimes" log.txt
fi