diff mbox series

[v4,04/21] ci: inherit --jobs via MAKEFLAGS in run-build-and-tests

Message ID 83b92a87e7698cee1e2c44252b934ad436d75a90.1548254412.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Offer to run CI/PR builds in Azure Pipelines | expand

Commit Message

Derrick Stolee via GitGitGadget Jan. 23, 2019, 2:40 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Let's not decide in the generic ci/ script how many jobs to run in
parallel; it is easy enough to hand that information down via the
`MAKEFLAGS`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 ci/run-build-and-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano Jan. 23, 2019, 10:22 p.m. UTC | #1
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Let's not decide in the generic ci/ script how many jobs to run in
> parallel; it is easy enough to hand that information down via the
> `MAKEFLAGS`.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  ci/run-build-and-tests.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> index db342bb6a8..80d72d120f 100755
> --- a/ci/run-build-and-tests.sh
> +++ b/ci/run-build-and-tests.sh
> @@ -7,7 +7,7 @@
>  
>  ln -s "$cache_dir/.prove" t/.prove
>  
> -make --jobs=2
> +make
>  make --quiet test
>  if test "$jobname" = "linux-gcc"
>  then

As there is no assignment to MAKEFLAGS in this patch, is it intended
for this step to change behaviour (possibly with the intention to
add "default 2 jobs at least under travis" back later in the
series)?  Not that it matters too much, but it is unnerving to see
that the proposed log message promising "it is easy enough" while
not actually doing so, without expressing an intention.
SZEDER Gábor Jan. 25, 2019, 1:25 p.m. UTC | #2
On Wed, Jan 23, 2019 at 02:22:10PM -0800, Junio C Hamano wrote:
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
> 
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > Let's not decide in the generic ci/ script how many jobs to run in
> > parallel; it is easy enough to hand that information down via the
> > `MAKEFLAGS`.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >  ci/run-build-and-tests.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> > index db342bb6a8..80d72d120f 100755
> > --- a/ci/run-build-and-tests.sh
> > +++ b/ci/run-build-and-tests.sh
> > @@ -7,7 +7,7 @@
> >  
> >  ln -s "$cache_dir/.prove" t/.prove
> >  
> > -make --jobs=2
> > +make
> >  make --quiet test
> >  if test "$jobname" = "linux-gcc"
> >  then
> 
> As there is no assignment to MAKEFLAGS in this patch, is it intended
> for this step to change behaviour (possibly with the intention to
> add "default 2 jobs at least under travis" back later in the
> series)?  Not that it matters too much, but it is unnerving to see
> that the proposed log message promising "it is easy enough" while
> not actually doing so, without expressing an intention.

Furthermore, there are several other 'ci/run-<something>.sh' scripts
that still run 'make -j N'.
Johannes Schindelin Jan. 26, 2019, 6:48 p.m. UTC | #3
Hi Junio,

On Wed, 23 Jan 2019, Junio C Hamano wrote:

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
> 
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > Let's not decide in the generic ci/ script how many jobs to run in
> > parallel; it is easy enough to hand that information down via the
> > `MAKEFLAGS`.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >  ci/run-build-and-tests.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> > index db342bb6a8..80d72d120f 100755
> > --- a/ci/run-build-and-tests.sh
> > +++ b/ci/run-build-and-tests.sh
> > @@ -7,7 +7,7 @@
> >  
> >  ln -s "$cache_dir/.prove" t/.prove
> >  
> > -make --jobs=2
> > +make
> >  make --quiet test
> >  if test "$jobname" = "linux-gcc"
> >  then
> 
> As there is no assignment to MAKEFLAGS in this patch, is it intended
> for this step to change behaviour (possibly with the intention to
> add "default 2 jobs at least under travis" back later in the
> series)?  Not that it matters too much, but it is unnerving to see
> that the proposed log message promising "it is easy enough" while
> not actually doing so, without expressing an intention.

I was under the incorrect impression that Travis already configured a
MAKEFLAGS=--jobs=<n> by default (I got fooled by the GIT_PROVE_OPTS
setting that configures that --jobs option).

But the spirit of the change is still correct, I would think, so I made
the change more complete by actually setting MAKEFLAGS in the
CI-specific sections, and by removing the explicit --jobs=2 parameters in
the scripts.

Ciao,
Dscho
Johannes Schindelin Jan. 28, 2019, 4:02 p.m. UTC | #4
Hi Gábor,

On Fri, 25 Jan 2019, SZEDER Gábor wrote:

> On Wed, Jan 23, 2019 at 02:22:10PM -0800, Junio C Hamano wrote:
> > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> > writes:
> > 
> > > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> > >
> > > Let's not decide in the generic ci/ script how many jobs to run in
> > > parallel; it is easy enough to hand that information down via the
> > > `MAKEFLAGS`.
> > >
> > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > > ---
> > >  ci/run-build-and-tests.sh | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> > > index db342bb6a8..80d72d120f 100755
> > > --- a/ci/run-build-and-tests.sh
> > > +++ b/ci/run-build-and-tests.sh
> > > @@ -7,7 +7,7 @@
> > >  
> > >  ln -s "$cache_dir/.prove" t/.prove
> > >  
> > > -make --jobs=2
> > > +make
> > >  make --quiet test
> > >  if test "$jobname" = "linux-gcc"
> > >  then
> > 
> > As there is no assignment to MAKEFLAGS in this patch, is it intended
> > for this step to change behaviour (possibly with the intention to
> > add "default 2 jobs at least under travis" back later in the
> > series)?  Not that it matters too much, but it is unnerving to see
> > that the proposed log message promising "it is easy enough" while
> > not actually doing so, without expressing an intention.
> 
> Furthermore, there are several other 'ci/run-<something>.sh' scripts
> that still run 'make -j N'.

Indeed. I removed those `--jobs=2` options from those.

Granted, I did not audit whether there were `make` calls that did not have
any `-j` option, but I think it would be safe to parallelize all of them
via `MAKEFLAGS`.

Ciao,
Dscho
diff mbox series

Patch

diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index db342bb6a8..80d72d120f 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -7,7 +7,7 @@ 
 
 ln -s "$cache_dir/.prove" t/.prove
 
-make --jobs=2
+make
 make --quiet test
 if test "$jobname" = "linux-gcc"
 then