From 5d0ab6fc5f33e31888f6430541b6830208f3f813 Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Sun, 6 Jun 2021 04:37:26 -0500 Subject: [PATCH] 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 --- tools/ci/compile_and_run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/ci/compile_and_run.sh b/tools/ci/compile_and_run.sh index 65c2ed4d21d..3745e41e39d 100644 --- a/tools/ci/compile_and_run.sh +++ b/tools/ci/compile_and_run.sh @@ -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