Add CI annotations to compile errors/warnings. (#8120)

* Add CI annotations to compile errors/warnings.

* Update tools/ci/compile_and_run.sh

* temporary commit to cause a ton of compile errors

* fixes sed and output

* make the code compile again

* try to fix slowdown

* fuck
This commit is contained in:
MarinaGryphon
2021-06-06 05:38:57 -04:00
committed by VirgoBot
parent 9fbe2cdfdd
commit 5d0ab6fc5f
+6 -2
View File
@@ -11,9 +11,13 @@ cp config/example/* config/
# Define any unit test defines that need to run
echo "#define ${TEST_DEFINE} 1" > ${TEST_FILE}
# Compile a copy of the codebase
DreamMaker $BASENAME.dme
# Compile a copy of the codebase, and print errors as Github Actions annotations
DreamMaker $BASENAME.dme > compile.log
exitVal=$?
cat compile.log
if [ $exitVal -gt 0 ]; then
sed -E -n 's/^(.+?\.dm):([0-9]+):(error|warning): (.+)$/::\3 file=\1,line=\2::\4/gp' < compile.log
fi
# Compile failed on map_test
if [ $exitVal -gt 0 ] && [ $TEST_DEFINE = "MAP_TEST" ]; then