git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ci: fix GitHub workflow when on a tagged revision

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Apr 24, 2020, 17:17 UTC
Message-ID
<pull.619.git.1587748660308.gitgitgadget@gmail.com>
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
Next: Junio C Hamano
Message 1 of 16 in “ci: fix GitHub workflow when on a tagged revision”
  1. ci: fix GitHub workflow when on a tagged revisionJohannes Schindelin via GitGitGadget, Apr 24, 2020
  2. Junio C HamanoApr 24, 2020
  3. Johannes SchindelinApr 24, 2020
  4. Junio C HamanoApr 24, 2020
  5. 0/2 Do not skip tagged revisions in the GitHub workflow runsJohannes Schindelin via GitGitGadget, Oct 8, 2020
  6. 1/2 ci: skip GitHub workflow runs for already-tested commits/treesJohannes Schindelin via GitGitGadget, Oct 8, 2020
  7. SZEDER GáborOct 9, 2020
  8. Johannes SchindelinOct 9, 2020
  9. SZEDER GáborOct 10, 2020
  10. Johannes SchindelinOct 11, 2020
  11. Junio C HamanoOct 12, 2020
  12. Johannes SchindelinOct 12, 2020
  13. Junio C HamanoOct 15, 2020
  14. Johannes SchindelinOct 15, 2020
  15. 2/2 ci: do not skip tagged revisions in GitHub workflowsJohannes Schindelin via GitGitGadget, Oct 8, 2020
  16. Junio C HamanoOct 8, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.