Run debug & release builds in parallel

This commit is contained in:
Starbeamrainbowlabs 2019-02-12 20:22:28 +00:00
parent 83c1246fab
commit de1cc6bb51
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 28 additions and 2 deletions

30
build
View File

@ -55,6 +55,7 @@ function task_setup {
check_command mono true;
check_command msbuild true;
check_command nuget true;
check_command mktemp true;
task_end 0;
}
@ -65,8 +66,33 @@ function task_build {
task_end $?;
task_begin "Building";
execute msbuild;
execute msbuild /p:Configuration=Release;
debug_logfile="$(mktemp --suffix ".rhinoreminds.debug.log")";
release_logfile="$(mktemp --suffix ".rhinoreminds.release.log")";
(
execute msbuild /consoleloggerparameters:ForceConsoleColor >"${debug_logfile}" 2>&1
release_exit_code=$!;
) &
(
execute msbuild /consoleloggerparameters:ForceConsoleColor /p:Configuration=Release >"${release_logfile}" 2>&1
debug_exit_code=$!;
) &
wait
# FUTURE: Grab the
stage_begin "Debug compilation output";
cat "${debug_logfile}";
stage_end "${release_exit_code}";
stage_begin "Release compilation output";
cat "${release_logfile}";
stage_end "${debug_exit_code}";
echo "";
rm "${debug_logfile}" "${release_logfile}";
task_end $?;
}