git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: Jeff King <peff@peff.net>, Git Users <git@vger.kernel.org>
Subject: Re: Reducing redundant build at Travis?
Date: Thu, 20 Jul 2017 08:16:30 -0700	[thread overview]
Message-ID: <xmqq4lu7m94h.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <4BB4EDA1-58A5-45AD-8BEC-1CB06CDC23DD@gmail.com> (Lars Schneider's message of "Thu, 20 Jul 2017 10:18:45 +0200")

Lars Schneider <larsxschneider@gmail.com> writes:

>> On 14 Jul 2017, at 17:32, Jeff King <peff@peff.net> wrote:
>> 
>> I don't know if Travis's cache storage is up to that challenge. We could
>> probably build such a lock on top of third-party storage, but things are
>> rapidly getting more complex.
>
> I think we shouldn't go there because of the complexity. I reached out
> to TravisCI and asked about the "hash build twice" problem [1]. Unfortunately,
> I got no response, yet. The issue could also be considered a feature as you
> could perform different actions in your TravisCI configuration based on
> the branch name.

Oh, no doubt that it is a feature, and a very useful one at that.
With that, we can change actions depending on the branch name in
such a way that normally we do our build and test, but when we are
on a branch (not testing a tag) and its tip is tagged, we become
no-op to avoid the cost of testing.  That is the feature we exactly
want.

The question I had, and wanted a help from you, was if there was a
way we can write that "are we on a branch (not testing a tag) and is
its tip tagged?" test only once in .travis.yml, even though we have
quite a many items in the matrix.  With the current way .travis.yml
is laid out, without such a facility, we'd need the logic sprinkled
to at the beginning of all "before_install:" or something like that,
which is not quite optimal.

> I think Junio's original suggestions for the Windows build makes a lot
> of sense because it saves Dscho's compute resources:
>
> --- 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")
>
> However, I don't think we need to do the same for the builds that
> use TravisCI resources. If they would be concerned about that then 
> they wouldn't build the same hash twice in the first place.

But I do care ;-) It would be nice for me not to have to wait and
keep worrying about MacOSX builds.  It also is not nice that
branches for other tests are blocked and have to wait only because
'maint' and 'vX.Y.Z' are both tested even though we know they are
the same tree.  This is where my question earlier comes from---is
there a good way to do the "not test a branch if its at a tagged
commit, because that tag will be tested anyway" test only at one
place in the .travis.yml we have?---because it's not like we only
care about Windows.


  reply	other threads:[~2017-07-20 15:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 23:44 Reducing redundant build at Travis? Junio C Hamano
2017-07-13 21:21 ` 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 [this message]
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=xmqq4lu7m94h.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    --cc=peff@peff.net \
    /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).