Skip to content

ci(GitHub): mark up compile errors, too

Johannes Schindelin via GitGitGadget git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

* Using a comma in the workflow command now, as described in the official documentation ;-) (Thank you, Ævar)
* The curly bracket construct was replaced by a proper subshell, to avoid jumbled output and a race where the exit.status file could be read before it was written.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ci(github): use grouping also in the `win-build` jobci/make-test-artifacts.sh+1 -10 replies
2/2ci(github): also mark up compile errorsci/lib.sh+8 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] ci(GitHub): mark up compile errors, too

Just like we mark up test failures, it makes sense to mark up compile errors, too.

In a sense, it makes even more sense with compile errors than with test failures because we can link directly to the corresponding source code in the former case (if said code has been touched by the Pull Request, that is). The only downside is that this link currently is kind of misleading if the Pull Request did not even touch the offending source code (such as was the case when a GCC upgrade in Git for Windows' SDK all of a sudden pointed out problems in the source code that had existed for a long time already). We will see how the GitHub Actions engineers will develop this feature further.

This patch series is based on js/ci-github-workflow-markup. Which also serves as an example how this looks like if the offending source code was not touched by the Pull Request:
https://github.com/dscho/git/actions/runs/2477526645 because it still triggers the above-referenced GCC build failure.

Changes since v1:

* Using a comma in the workflow command now, as described in the official documentation ;-) (Thank you, Ævar)
* The curly bracket construct was replaced by a proper subshell, to avoid jumbled output and a race where the exit.status file could be read before it was written.

Johannes Schindelin (2):
ci(github): use grouping also in the win-build job ci(github): also mark up compile errors

 ci/lib.sh                 | 10 ++++++++--
 ci/make-test-artifacts.sh |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

base-commit: 3069f2a6f4c38e7e599067d2e4a8e31b4f53e2d3
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1253%2Fdscho%2Fci-mark-up-compile-failures-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1253/dscho/ci-mark-up-compile-failures-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1253

Range-diff vs v1:

 1:  5212c5ec474 = 1:  5212c5ec474 ci(github): use grouping also in the `win-build` job
 2:  19d6e34f038 ! 2:  34daf06bb71 ci(github): also mark up compile errors
     @@ ci/lib.sh: else
      -		"$@"
      -		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/'
     ++		) |
     ++		sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2,line=\3::\1/'
      +		res=$(cat exit.status)
      +		rm exit.status
       		end_group
Signature · 1 line
gitgitgadget