git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] Makefile: enable -Wsparse-error for DEVELOPER build
Date: Wed, 4 Nov 2020 14:43:43 +0100 (CET)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.2011041431370.18437@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <43aadae9-a4c1-f1e4-6902-c05af36fcf19@ramsayjones.plus.com>

Hi Ramsay,

On Tue, 3 Nov 2020, Ramsay Jones wrote:

> On 02/11/2020 18:55, Junio C Hamano wrote:
>
> > CI builds already have enough stuff around invocation of "make test"
> > etc., and it would be trivial to pass SPARSE_FLAGS from the command
> > line when adding "make sparse" invocation to one of the scripts in ci/
> > directory, so from that point of view, this patch is not needed for
> > them, either.
>
> My concern was more about how the CI system obtains/installs/builds a
> sufficiently new version of sparse. Otherwise, 'make sparse' won't do
> very much. ;-)  As I said, I don't know what's involved in getting that
> to work.

As mentioned in https://github.com/gitgitgadget/git/issues/345, there is a
Pipeline that builds sparse packages for Ubuntu, ready for use in our CI
build: https://dev.azure.com/git/git/_build?definitionId=10&_a=summary.
Currently, it is scheduled to run every weekday at 5:00am (I assume that's
UTC).

So I went ahead and added more details to the ticket, essentially
demonstrating how the `sparse` package can be downloaded and installed in
the CI build in a Bash step:

-- snip --
urlbase=https://dev.azure.com/git/git/_apis/build/builds
id=$(curl "$urlbase?definitions=10&statusFilter=completed&resultFilter=succeeded&\$top=1" |
	json_pp |
	sed -n 's/^         "id" : \([1-9][0-9]*\).*/\1/p')
download_url="$(curl "$urlbase/$id/artifacts" |
	json_pp |
	sed -n '/^      {/{:1;N;/\n      }/b2;b1;:2;/"name" : "sparse"/{s/.*"downloadUrl" : "\([^"]*\).*/\1/p}}')"
curl -Lo sparse.zip "$download_url"
unzip sparse.zip
sudo dpkg -i sparse/*.deb
-- snap --

It is quite likely that the ugly and unwieldy `json_pp | sed` things could
be replaced by elegant `jq` calls.

Ciao,
Dscho

  parent reply	other threads:[~2020-11-04 13:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 21:04 [PATCH] upload-pack.c: fix a sparse warning Ramsay Jones
2020-10-31 22:22 ` [PATCH] Makefile: enable -Wsparse-error for DEVELOPER build Junio C Hamano
2020-11-02  0:05   ` Ramsay Jones
2020-11-02 18:55     ` Junio C Hamano
2020-11-03  2:04       ` Ramsay Jones
2020-11-03  2:50         ` Junio C Hamano
2020-11-04 13:43         ` Johannes Schindelin [this message]
2020-11-04 16:57           ` Ramsay Jones
2020-11-04 18:11             ` Junio C Hamano
2020-11-04 20:05               ` Ramsay Jones
2020-11-02 22:21 ` [PATCH] upload-pack.c: fix a sparse warning Josh Steadmon

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=nycvar.QRO.7.76.6.2011041431370.18437@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsayjones.plus.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).