From e353d2a88ea6f3349b15b0ed362bfe057e4831a8 Mon Sep 17 00:00:00 2001 From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:33:06 +0100 Subject: [PATCH] [ACTIONS] show last lines before error in BR2 build --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b409e276c..1caff9f59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,9 +50,12 @@ jobs: sudo apt update && sudo apt install -y gsfonts make miyoo_uclibc_defconfig set -o pipefail - make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" 2>&1 \ - |tee build.log \ - |grep ">>>" + if ! ( \ + make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" 2>&1 \ + | tee build.log \ + | grep ">>>" \ + ); then tail -n100 build.log && exit 1 + fi - name: Archive build logs (uClibc) if: success() || failure() @@ -131,9 +134,12 @@ jobs: sudo apt update && sudo apt install -y gsfonts make miyoo_musl_defconfig set -o pipefail - make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" 2>&1 \ - |tee build.log \ - |grep ">>>" + if ! ( \ + make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" 2>&1 \ + | tee build.log \ + | grep ">>>" \ + ); then tail -n100 build.log && exit 1 + fi - name: Archive build logs (musl) if: success() || failure() @@ -204,9 +210,12 @@ jobs: cd ${{ inputs.submodule || '.' }} make miyoo_uclibc_static_defconfig set -o pipefail - make sdk 2>&1 \ - |tee build.log \ - |grep ">>>" + if ! ( \ + make sdk 2>&1 \ + | tee build.log \ + | grep ">>>" \ + ); then tail -n100 build.log && exit 1 + fi - name: Archive build logs (uClibc static) if: success() || failure() @@ -253,9 +262,12 @@ jobs: cd ${{ inputs.submodule || '.' }} make miyoo_musl_static_defconfig set -o pipefail - make sdk 2>&1 \ - |tee build.log \ - |grep ">>>" + if ! ( \ + make sdk 2>&1 \ + | tee build.log \ + | grep ">>>" \ + ); then tail -n100 build.log && exit 1 + fi - name: Archive build logs (musl static) if: success() || failure()