From: Junio C Hamano <gitster@pobox.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: git@vger.kernel.org
Subject: Reducing redundant build at Travis?
Date: Wed, 12 Jul 2017 16:44:12 -0700 [thread overview]
Message-ID: <xmqqeftlz0dv.fsf@gitster.mtv.corp.google.com> (raw)
I usually try to stay as late as possible to finish all the
integration branches in order before pushing out the result; it is
more efficient to be able to batch things (for humans).
I however noticed that This often means we would have multiple build
jobs at Travis for branches and builds on Windows often fails
waiting for its response. Since I tagged the tip of 'maint', and I
wanted to give all the build a fair chance to succeed without other
build jobs starving it of resources, I pushed out 'maint' and the
tag before others, even though I already have all the other
integration branches ready.
Unfortunately, https://travis-ci.org/git/git/builds/ shows that it
does not care if it spawned a job to build the tip of 'maint' and
another for 'v2.13.3' that point at the same thing.
I do not mind this behaviour terribly for Linux builds that never
seem to time out, but it is wasteful. Here is what I came up with
to skip the build and test on a branch tip that is tagged, but I
suspect this would not actually work (when told to build a tag, I
suspect that it would try to find an exact-match and ends up finding
itself, refusing to do the work).
I also do not quite like the way that I had to add a check like this
for every script: thing in the .travis.yml file (the attached does
not even cover MacOS whose build tends to take a lot longer). I
suspect that you or others who are better versed with the system may
have better idea to have a single centralized check that avoids a
tip of a branch that is pointed at by a release tag.
Thanks.
ci/run-linux32-build.sh | 6 ++++++
ci/run-windows-build.sh | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh
index e30fb2cddc..ffb5c8fdf1 100755
--- a/ci/run-linux32-build.sh
+++ b/ci/run-linux32-build.sh
@@ -6,6 +6,12 @@
# run-linux32-build.sh [host-user-id]
#
+if TAG=$(git describe --exact-match HEAD 2>/dev/null)
+then
+ echo "The tip of the branch is exactly at $TAG"
+ exit 0
+fi
+
# Update packages to the latest available versions
linux32 --32bit i386 sh -c '
apt update >/dev/null &&
diff --git a/ci/run-windows-build.sh b/ci/run-windows-build.sh
index 2d98f6b2f9..74d4819d74 100755
--- a/ci/run-windows-build.sh
+++ b/ci/run-windows-build.sh
@@ -12,6 +12,12 @@ test -z "$GFW_CI_TOKEN" && echo "GFW_CI_TOKEN not defined" && exit
BRANCH=$1
COMMIT=$2
+if TAG=$(git describe --exact-match "$COMMIT" 2>/dev/null)
+then
+ echo "Tip of $BRANCH exactly at $TAG"
+ exit 0
+fi
+
gfwci () {
local CURL_ERROR_CODE HTTP_CODE
CONTENT_FILE=$(mktemp -t "git-windows-ci-XXXXXX")
next reply other threads:[~2017-07-12 23:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 23:44 Junio C Hamano [this message]
2017-07-13 21:21 ` Reducing redundant build at Travis? Lars Schneider
2017-07-13 21:53 ` Junio C Hamano
2017-07-14 12:24 ` Jeff King
2017-07-14 14:54 ` Junio C Hamano
2017-07-14 15:32 ` Jeff King
2017-07-20 8:18 ` Lars Schneider
2017-07-20 15:16 ` Junio C Hamano
2017-07-21 16:11 ` Lars Schneider
2017-07-21 16:44 ` Junio C Hamano
2017-07-26 16:43 ` Lars Schneider
2017-07-26 18:08 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqeftlz0dv.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).