aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/scripts
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/scripts')
-rwxr-xr-x.github/workflows/scripts/show_build_failures.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/scripts/show_build_failures.sh b/.github/workflows/scripts/show_build_failures.sh
new file mode 100755
index 0000000000..14f699c93d
--- /dev/null
+++ b/.github/workflows/scripts/show_build_failures.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+original_exit_code="${ret:-1}"
+log_dir_path="${1:-logs}"
+context="${2:-10}"
+
+show_make_build_errors() {
+ grep -slr 'make\[[[:digit:]]\].*Error [[:digit:]]$' "$log_dir_path" | while IFS= read -r log_file; do
+ printf "====== Make errors from %s ======\n" "$log_file";
+ grep -r -C"$context" 'make\[[[:digit:]]\].*Error [[:digit:]]$' "$log_file" ;
+ done
+}
+
+show_make_build_errors
+exit "$original_exit_code"