[2/2] ci: disable Homebrew's auto cleanup
diff mbox series

Message ID 20190703104748.32533-2-szeder.dev@gmail.com
State New
Headers show
Series
  • [1/2] ci: don't update Homebrew
Related show

Commit Message

SZEDER Gábor July 3, 2019, 10:47 a.m. UTC
Lately Homebrew learned to automagically clean up information about
outdated packages during other 'brew' commands, which might be useful
for the avarage user, but is a waste of time in CI build jobs, because
the next build jobs will start from the exact same image containing
the same outdated packages anyway.

Export HOMEBREW_NO_AUTO_UPDATE=1 to disable this auto cleanup feature,
shaving off about 20-30s from the time needed to install dependencies
in our macOS build jobs on Travis CI.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 ci/install-dependencies.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Schindelin July 3, 2019, 11:49 a.m. UTC | #1
Hi,

On Wed, 3 Jul 2019, SZEDER Gábor wrote:

> Lately Homebrew learned to automagically clean up information about
> outdated packages during other 'brew' commands, which might be useful
> for the avarage user, but is a waste of time in CI build jobs, because
> the next build jobs will start from the exact same image containing
> the same outdated packages anyway.
>
> Export HOMEBREW_NO_AUTO_UPDATE=1 to disable this auto cleanup feature,
> shaving off about 20-30s from the time needed to install dependencies
> in our macOS build jobs on Travis CI.

I am very much in favor of both of these patches.

Thanks,
Dscho
Thomas Braun July 3, 2019, 12:26 p.m. UTC | #2
Am 03.07.2019 um 12:47 schrieb SZEDER Gábor:
> Lately Homebrew learned to automagically clean up information about
> outdated packages during other 'brew' commands, which might be useful
> for the avarage user, but is a waste of time in CI build jobs, because
> the next build jobs will start from the exact same image containing
> the same outdated packages anyway.
> 
> Export HOMEBREW_NO_AUTO_UPDATE=1 to disable this auto cleanup feature,

The patch below adds HOMEBREW_NO_INSTALL_CLEANUP so maybe you meant
HOMEBREW_NO_INSTALL_CLEANUP here as well?

> shaving off about 20-30s from the time needed to install dependencies
> in our macOS build jobs on Travis CI.
> 
> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
>  ci/install-dependencies.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 7f546c8552..8cc72503cb 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -34,7 +34,7 @@ linux-clang|linux-gcc)
>  	popd
>  	;;
>  osx-clang|osx-gcc)
> -	export HOMEBREW_NO_AUTO_UPDATE=1
> +	export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
>  	# Uncomment this if you want to run perf tests:
>  	# brew install gnu-time
>  	test -z "$BREW_INSTALL_PACKAGES" ||
>
SZEDER Gábor July 3, 2019, 1:04 p.m. UTC | #3
On Wed, Jul 03, 2019 at 02:26:21PM +0200, Thomas Braun wrote:
> Am 03.07.2019 um 12:47 schrieb SZEDER Gábor:
> > Lately Homebrew learned to automagically clean up information about
> > outdated packages during other 'brew' commands, which might be useful
> > for the avarage user, but is a waste of time in CI build jobs, because
> > the next build jobs will start from the exact same image containing
> > the same outdated packages anyway.
> > 
> > Export HOMEBREW_NO_AUTO_UPDATE=1 to disable this auto cleanup feature,
> 
> The patch below adds HOMEBREW_NO_INSTALL_CLEANUP so maybe you meant
> HOMEBREW_NO_INSTALL_CLEANUP here as well?

Thanks, good catch.  Apparently copy-pasted the wrong env var from the
patch to the commit message...

> > shaving off about 20-30s from the time needed to install dependencies
> > in our macOS build jobs on Travis CI.
> > 
> > Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> > ---
> >  ci/install-dependencies.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> > index 7f546c8552..8cc72503cb 100755
> > --- a/ci/install-dependencies.sh
> > +++ b/ci/install-dependencies.sh
> > @@ -34,7 +34,7 @@ linux-clang|linux-gcc)
> >  	popd
> >  	;;
> >  osx-clang|osx-gcc)
> > -	export HOMEBREW_NO_AUTO_UPDATE=1
> > +	export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
> >  	# Uncomment this if you want to run perf tests:
> >  	# brew install gnu-time
> >  	test -z "$BREW_INSTALL_PACKAGES" ||
> > 
>
Junio C Hamano July 3, 2019, 4:58 p.m. UTC | #4
SZEDER Gábor <szeder.dev@gmail.com> writes:

> On Wed, Jul 03, 2019 at 02:26:21PM +0200, Thomas Braun wrote:
>> Am 03.07.2019 um 12:47 schrieb SZEDER Gábor:
>> > Lately Homebrew learned to automagically clean up information about
>> > outdated packages during other 'brew' commands, which might be useful
>> > for the avarage user, but is a waste of time in CI build jobs, because
>> > the next build jobs will start from the exact same image containing
>> > the same outdated packages anyway.
>> > 
>> > Export HOMEBREW_NO_AUTO_UPDATE=1 to disable this auto cleanup feature,
>> 
>> The patch below adds HOMEBREW_NO_INSTALL_CLEANUP so maybe you meant
>> HOMEBREW_NO_INSTALL_CLEANUP here as well?
>
> Thanks, good catch.  Apparently copy-pasted the wrong env var from the
> patch to the commit message...

Applied an obvious rewording manually while queuing.

Thanks.

commit af8ed04778781f2013d26cc450173190fb5876d6
Author: SZEDER Gábor <szeder.dev@gmail.com>
Date:   Wed Jul 3 12:47:48 2019 +0200

    ci: disable Homebrew's auto cleanup
    
    Lately Homebrew learned to automagically clean up information about
    outdated packages during other 'brew' commands, which might be useful
    for the avarage user, but is a waste of time in CI build jobs, because
    the next build jobs will start from the exact same image containing
    the same outdated packages anyway.
    
    Export HOMEBREW_NO_INSTALL_CLEANUP=1 to disable this auto cleanup feature,
    shaving off about 20-30s from the time needed to install dependencies
    in our macOS build jobs on Travis CI.
    
    Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patch
diff mbox series

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 7f546c8552..8cc72503cb 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -34,7 +34,7 @@  linux-clang|linux-gcc)
 	popd
 	;;
 osx-clang|osx-gcc)
-	export HOMEBREW_NO_AUTO_UPDATE=1
+	export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
 	# Uncomment this if you want to run perf tests:
 	# brew install gnu-time
 	test -z "$BREW_INSTALL_PACKAGES" ||