From 5aeb145780ffdfd516ad6fa697e7e14ba29be0bf Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 8 Jun 2022 10:43:18 +0000 Subject: ci(github): bring back the 'print test failures' step Git now shows better information in the GitHub workflow runs when a test case failed. However, when a test case was implemented incorrectly and therefore does not even run, nothing is shown. Let's bring back the step that prints the full logs of the failed tests, and to improve the user experience, print out an informational message for readers so that they do not have to know/remember where to see the full logs. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- ci/lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/lib.sh b/ci/lib.sh index 2f6d9d26e4..b142d254ec 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -177,7 +177,8 @@ then test_name="${test_exit%.exit}" test_name="${test_name##*/}" printf "\\e[33m\\e[1m=== Failed test: ${test_name} ===\\e[m\\n" - echo "The full logs are in the artifacts attached to this run." + echo "The full logs are in the 'print test failures' step below." + echo "See also the 'failed-tests-*' artifacts attached to this run." cat "t/test-results/$test_name.markup" trash_dir="t/trash directory.$test_name" -- cgit v1.2.3 From df5fed9c34a394b55194b3fb69413bcc4c76fd64 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 13 Jun 2022 13:13:07 +0000 Subject: ci(github): use grouping also in the `win-build` job We already do the same when building Git in all the other jobs. This will allow us to piggy-back on top of grouping to mark up compiler errors in the next commit. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- ci/make-test-artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/make-test-artifacts.sh b/ci/make-test-artifacts.sh index 646967481f..74141af0cc 100755 --- a/ci/make-test-artifacts.sh +++ b/ci/make-test-artifacts.sh @@ -7,6 +7,6 @@ mkdir -p "$1" # in case ci/lib.sh decides to quit early . ${0%/*}/lib.sh -make artifacts-tar ARTIFACTS_DIRECTORY="$1" +group Build make artifacts-tar ARTIFACTS_DIRECTORY="$1" check_unignored_build_artifacts -- cgit v1.2.3 From cadcafc3311de7f6fae5f3add10cde4f93268ff8 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 13 Jun 2022 13:13:08 +0000 Subject: ci(github): also mark up compile errors When GCC produces those helpful errors, we will want to present them in the GitHub workflow runs in the most helpful manner. To that end, we want to use workflow commands to render errors and warnings: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions In the previous commit, we ensured that grouping is used for the build in all jobs, and this allows us to piggy-back onto the `group` function to transmogrify the output. Note: If `set -o pipefail` was available, we could do this in a little more elegant way. But since some of the steps are run using `dash`, we have to do a little `{ ...; echo $? >exit.status; } | ...` dance. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- ci/lib.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/lib.sh b/ci/lib.sh index b142d254ec..f095519f8d 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -29,8 +29,14 @@ else set +x begin_group "$1" shift - "$@" - res=$? + # work around `dash` not supporting `set -o pipefail` + ( + "$@" 2>&1 + echo $? >exit.status + ) | + sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2,line=\3::\1/' + res=$(cat exit.status) + rm exit.status end_group return $res } -- cgit v1.2.3