From 5245d1cb15b8ccf6a3a044ea58ce87652788c639 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 1 Oct 2025 18:42:05 +0300 Subject: [PATCH] .github/workflows: Print compilation output and improve annotations Show the kernel compilation output whenever the run reached the compilation stage (both pass/fail cases) and add a readable prefix with the actual filename. Also refactor to use variables for version, workdir, and output; quote expansions; and switch to titled GitHub Actions annotations. Drop `-k` and rely on explicit cleanup. --- .github/workflows/run_regression_tests.yaml | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index 2bf37f2a4..e04a616c9 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -85,19 +85,30 @@ jobs: - name: Run regression tests run: | err=0 + version="${{matrix.version}}" + workdir="/tmp/scst-${version}" + out="output.txt" - ./scripts/run-regression-tests -l -q -k -d /tmp/scst-${{matrix.version}} ${{matrix.version}}-nc-ns-nm | tee output.txt + ./scripts/run-regression-tests -l -q -d "${workdir}" "${version}-nc-ns-nm" | tee "${out}" - if ! grep -q "Compiling the patched kernel" output.txt; then - echo "::error ::run-regression-tests failed" + if ! grep -q "Compiling the patched kernel" "${out}"; then + echo "::error title=Regression tests::run-regression-tests failed" err=1 else - if grep -A1 "Compiling the patched kernel" output.txt | grep -E -q "FAILED|[1-9][0-9]* errors"; then - echo "::error ::Regression test failed" + if grep -A1 "Compiling the patched kernel" "${out}" | grep -E -q "FAILED|[1-9][0-9]* errors"; then + echo "::error title=Regression tests::Regression test failed" err=1 + else + echo "::notice title=Regression tests::Succeeded" fi + + f=( "${workdir}"/compilation-*-output.txt ) + echo + echo "===== $(basename "${f[0]}") =====" + cat "${f[0]}" fi - rm -f output.txt + rm -rf "${workdir}" + rm -f "${out}" exit $err