git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] ci: fix GitHub workflow when on a tagged revision
@ 2020-04-24 17:17 Johannes Schindelin via GitGitGadget
  2020-04-24 20:50 ` Junio C Hamano
  2020-10-08 15:29 ` [PATCH v2 0/2] Do not skip tagged revisions in the GitHub workflow runs Johannes Schindelin via GitGitGadget
  0 siblings, 2 replies; 16+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2020-04-24 17:17 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

When `master` is tagged, and then both `master` and the tag are pushed,
Travis CI will happily build both. That is a waste of energy, which is
why we skip the build for `master` in that case.

However, our GitHub workflow does not trigger on tags, therefore, this
logic results in a missing build for that revision.

Even worse: the run would _fail_ because we would skip the Windows
build, there are no artifacts to publish, and therefore no artifacts to
download in the Windows test jobs.

Let's just change the GitHub workflow to skip the logic to skip
revisions that are tagged.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
    Do not skip tagged revisions in the GitHub workflow runs
    
    I noticed a failure in the run for Git for Windows v2.26.2 which was
    caused by this.
    
    This patch is based on dd/ci-swap-azure-pipelines-with-github-actions.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-619%2Fdscho%2Fgithub-workflows-and-tags-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-619/dscho/github-workflows-and-tags-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/619

 ci/lib.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ci/lib.sh b/ci/lib.sh
index dac36886e37..f151e2f0ecb 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -1,6 +1,7 @@
 # Library of functions shared by all CI scripts
 
 skip_branch_tip_with_tag () {
+	test -z "$DONT_SKIP_TAGS" || return 0
 	# Sometimes, a branch is pushed at the same time the tag that points
 	# at the same commit as the tip of the branch is pushed, and building
 	# both at the same time is a waste.
@@ -151,6 +152,7 @@ then
 	CC="${CC:-gcc}"
 
 	cache_dir="$HOME/none"
+	DONT_SKIP_TAGS=t
 
 	export GIT_PROVE_OPTS="--timer --jobs 10"
 	export GIT_TEST_OPTS="--verbose-log -x"

base-commit: f72f328bc57e1b0db380ef76e0c1e94a9ed0ac7c
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-10-15 19:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 17:17 [PATCH] ci: fix GitHub workflow when on a tagged revision Johannes Schindelin via GitGitGadget
2020-04-24 20:50 ` Junio C Hamano
2020-04-24 21:12   ` Johannes Schindelin
2020-04-24 21:24     ` Junio C Hamano
2020-10-08 15:29 ` [PATCH v2 0/2] Do not skip tagged revisions in the GitHub workflow runs Johannes Schindelin via GitGitGadget
2020-10-08 15:29   ` [PATCH v2 1/2] ci: skip GitHub workflow runs for already-tested commits/trees Johannes Schindelin via GitGitGadget
2020-10-09  7:29     ` SZEDER Gábor
2020-10-09 11:13       ` Johannes Schindelin
2020-10-10  7:25         ` SZEDER Gábor
2020-10-11 10:28           ` Johannes Schindelin
2020-10-12 16:12             ` Junio C Hamano
2020-10-12 18:57               ` Johannes Schindelin
2020-10-15 17:17                 ` Junio C Hamano
2020-10-15 19:39                   ` Johannes Schindelin
2020-10-08 15:29   ` [PATCH v2 2/2] ci: do not skip tagged revisions in GitHub workflows Johannes Schindelin via GitGitGadget
2020-10-08 21:11   ` [PATCH v2 0/2] Do not skip tagged revisions in the GitHub workflow runs Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).