git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Fix the speed of the CI (Visual Studio) tests
@ 2019-10-20 20:39 Johannes Schindelin via GitGitGadget
  2019-10-20 20:39 ` [PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-10-20 20:39 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano

I made a mistake when converting the make/prove-based test job to a 
test-tool run-command testsuite one: I lost the parallelization, resulting
in way slower CI runs.

Also, I forgot to build with DEVELOPER=1, i.e. with stricter compile flags.

This pair of patches fixes both issues.

Johannes Schindelin (2):
  ci(visual-studio): use strict compile flags, and optimization
  ci(visual-studio): actually run the tests in parallel

 azure-pipelines.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: d966095db01190a2196e31195ea6fa0c722aa732
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-410%2Fdscho%2Faccelerate-ci-vs-test-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-410/dscho/accelerate-ci-vs-test-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/410
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization
  2019-10-20 20:39 [PATCH 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
@ 2019-10-20 20:39 ` Johannes Schindelin via GitGitGadget
  2019-10-20 20:39 ` [PATCH 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
  2019-10-21 19:59 ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
  2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-10-20 20:39 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

To make full use of the work that went into the Visual Studio build &
test jobs in our CI/PR builds, let's turn on strict compiler flags. This
will give us the benefit of Visual C's compiler warnings (which, at
times, seem to catch things that GCC does not catch, and vice versa).

While at it, also turn on optimization; It does not make sense to
produce binaries with debug information, and we can use any ounce of
speed that we get (because the test suite is particularly slow on
Windows, thanks to the need to run inside a Unix shell, which
requires us to use the POSIX emulation layer provided by MSYS2).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 azure-pipelines.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9f099b9529..457c6fee31 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -157,7 +157,7 @@ jobs:
     displayName: 'Download git-sdk-64-minimal'
   - powershell: |
       & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
-        make vcxproj
+        make NDEBUG=1 DEVELOPER=1 vcxproj
       "@
       if (!$?) { exit(1) }
     displayName: Generate Visual Studio Solution
-- 
gitgitgadget


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ci(visual-studio): actually run the tests in parallel
  2019-10-20 20:39 [PATCH 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
  2019-10-20 20:39 ` [PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
@ 2019-10-20 20:39 ` Johannes Schindelin via GitGitGadget
  2019-10-20 21:23   ` Eric Sunshine
  2019-10-21 19:59 ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
  2 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-10-20 20:39 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Originally, the CI/PR builds that build and test using Visual Studio
were implemented imitating `linux-clang`, i.e. still using the
`Makefile`-based build infrastructure.

Later (but still before the patches made their way into git.git's
`master`), however, this was changed to generate Visual Studio project
files and build the binaries using `MSBuild`, as this reflects more
accurately how Visual Studio users would want to build Git (internally,
Visual Studio uses `MSBuild`, or at least something very similar).

During that transition, we needed to implement a new way to run the test
suite in parallel, as Visual Studio users typically will only have a Git
Bash available (which does not ship with `make` nore with support for
`prove`): we simply implemented a new test helper to run the test suite.

This helper even knows how to run the tests in parallel, but due to a
mistake on this developer's part, it was never turned on in the CI/PR
builds. This results in 2x-3x longer run times of the test phase.

Let's use the `--jobs=10` option to fix this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 azure-pipelines.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 457c6fee31..af2a5ea484 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -255,7 +255,7 @@ jobs:
 
         cd t &&
         PATH=\"`$PWD/helper:`$PATH\" &&
-        test-tool.exe run-command testsuite -V -x --write-junit-xml \
+        test-tool.exe run-command testsuite --jobs=10 -V -x --write-junit-xml \
                 `$(test-tool.exe path-utils slice-tests \
                         `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE t[0-9]*.sh)
       "@
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] ci(visual-studio): actually run the tests in parallel
  2019-10-20 20:39 ` [PATCH 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
@ 2019-10-20 21:23   ` Eric Sunshine
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Sunshine @ 2019-10-20 21:23 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget
  Cc: Git List, Johannes Schindelin, Junio C Hamano

On Sun, Oct 20, 2019 at 4:39 PM Johannes Schindelin via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> [...]
> During that transition, we needed to implement a new way to run the test
> suite in parallel, as Visual Studio users typically will only have a Git
> Bash available (which does not ship with `make` nore with support for

s/nore/nor/

> `prove`): we simply implemented a new test helper to run the test suite.
>
> This helper even knows how to run the tests in parallel, but due to a
> mistake on this developer's part, it was never turned on in the CI/PR
> builds. This results in 2x-3x longer run times of the test phase.
>
> Let's use the `--jobs=10` option to fix this.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests
  2019-10-20 20:39 [PATCH 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
  2019-10-20 20:39 ` [PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
  2019-10-20 20:39 ` [PATCH 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
@ 2019-10-21 19:59 ` Johannes Schindelin via GitGitGadget
  2019-10-21 19:59   ` [PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
                     ` (2 more replies)
  2 siblings, 3 replies; 9+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-10-21 19:59 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano

I made a mistake when converting the make/prove-based test job to a 
test-tool run-command testsuite one: I lost the parallelization, resulting
in way slower CI runs.

Also, I forgot to build with DEVELOPER=1, i.e. with stricter compile flags.

This pair of patches fixes both issues.

Changes since v1:

 * Fixed typo "nore" -> "nor" in the commit message.

Johannes Schindelin (2):
  ci(visual-studio): use strict compile flags, and optimization
  ci(visual-studio): actually run the tests in parallel

 azure-pipelines.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: d966095db01190a2196e31195ea6fa0c722aa732
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-410%2Fdscho%2Faccelerate-ci-vs-test-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-410/dscho/accelerate-ci-vs-test-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/410

Range-diff vs v1:

 1:  6fba3b1c76 = 1:  6fba3b1c76 ci(visual-studio): use strict compile flags, and optimization
 2:  e3343d1740 ! 2:  07749ab720 ci(visual-studio): actually run the tests in parallel
     @@ -14,7 +14,7 @@
      
          During that transition, we needed to implement a new way to run the test
          suite in parallel, as Visual Studio users typically will only have a Git
     -    Bash available (which does not ship with `make` nore with support for
     +    Bash available (which does not ship with `make` nor with support for
          `prove`): we simply implemented a new test helper to run the test suite.
      
          This helper even knows how to run the tests in parallel, but due to a

-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization
  2019-10-21 19:59 ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
@ 2019-10-21 19:59   ` Johannes Schindelin via GitGitGadget
  2019-10-21 19:59   ` [PATCH v2 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
  2019-10-23  2:06   ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Junio C Hamano
  2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-10-21 19:59 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

To make full use of the work that went into the Visual Studio build &
test jobs in our CI/PR builds, let's turn on strict compiler flags. This
will give us the benefit of Visual C's compiler warnings (which, at
times, seem to catch things that GCC does not catch, and vice versa).

While at it, also turn on optimization; It does not make sense to
produce binaries with debug information, and we can use any ounce of
speed that we get (because the test suite is particularly slow on
Windows, thanks to the need to run inside a Unix shell, which
requires us to use the POSIX emulation layer provided by MSYS2).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 azure-pipelines.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9f099b9529..457c6fee31 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -157,7 +157,7 @@ jobs:
     displayName: 'Download git-sdk-64-minimal'
   - powershell: |
       & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
-        make vcxproj
+        make NDEBUG=1 DEVELOPER=1 vcxproj
       "@
       if (!$?) { exit(1) }
     displayName: Generate Visual Studio Solution
-- 
gitgitgadget


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/2] ci(visual-studio): actually run the tests in parallel
  2019-10-21 19:59 ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
  2019-10-21 19:59   ` [PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
@ 2019-10-21 19:59   ` Johannes Schindelin via GitGitGadget
  2019-10-23  2:06   ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Junio C Hamano
  2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-10-21 19:59 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Originally, the CI/PR builds that build and test using Visual Studio
were implemented imitating `linux-clang`, i.e. still using the
`Makefile`-based build infrastructure.

Later (but still before the patches made their way into git.git's
`master`), however, this was changed to generate Visual Studio project
files and build the binaries using `MSBuild`, as this reflects more
accurately how Visual Studio users would want to build Git (internally,
Visual Studio uses `MSBuild`, or at least something very similar).

During that transition, we needed to implement a new way to run the test
suite in parallel, as Visual Studio users typically will only have a Git
Bash available (which does not ship with `make` nor with support for
`prove`): we simply implemented a new test helper to run the test suite.

This helper even knows how to run the tests in parallel, but due to a
mistake on this developer's part, it was never turned on in the CI/PR
builds. This results in 2x-3x longer run times of the test phase.

Let's use the `--jobs=10` option to fix this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 azure-pipelines.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 457c6fee31..af2a5ea484 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -255,7 +255,7 @@ jobs:
 
         cd t &&
         PATH=\"`$PWD/helper:`$PATH\" &&
-        test-tool.exe run-command testsuite -V -x --write-junit-xml \
+        test-tool.exe run-command testsuite --jobs=10 -V -x --write-junit-xml \
                 `$(test-tool.exe path-utils slice-tests \
                         `$SYSTEM_JOBPOSITIONINPHASE `$SYSTEM_TOTALJOBSINPHASE t[0-9]*.sh)
       "@
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests
  2019-10-21 19:59 ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
  2019-10-21 19:59   ` [PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
  2019-10-21 19:59   ` [PATCH v2 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
@ 2019-10-23  2:06   ` Junio C Hamano
  2019-10-24 23:23     ` Johannes Schindelin
  2 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2019-10-23  2:06 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget; +Cc: git, Johannes Schindelin

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> Changes since v1:
>
>  * Fixed typo "nore" -> "nor" in the commit message.
>
> Johannes Schindelin (2):
>   ci(visual-studio): use strict compile flags, and optimization
>   ci(visual-studio): actually run the tests in parallel
>
>  azure-pipelines.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks.

I will take the change to 'master' directly, as cooking in 'next'
won't give it any extra exposure when the topic touches only this
file and the patch comes from those who do exercise azure CI build
before sending it out to the list ;-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests
  2019-10-23  2:06   ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Junio C Hamano
@ 2019-10-24 23:23     ` Johannes Schindelin
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2019-10-24 23:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin via GitGitGadget, git

Hi Junio,

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

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > Changes since v1:
> >
> >  * Fixed typo "nore" -> "nor" in the commit message.
> >
> > Johannes Schindelin (2):
> >   ci(visual-studio): use strict compile flags, and optimization
> >   ci(visual-studio): actually run the tests in parallel
> >
> >  azure-pipelines.yml | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Thanks.
>
> I will take the change to 'master' directly, as cooking in 'next'
> won't give it any extra exposure when the topic touches only this
> file and the patch comes from those who do exercise azure CI build
> before sending it out to the list ;-)

Thank you very much! It is indeed a lot faster now.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-24 23:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20 20:39 [PATCH 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
2019-10-20 20:39 ` [PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
2019-10-20 20:39 ` [PATCH 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
2019-10-20 21:23   ` Eric Sunshine
2019-10-21 19:59 ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Johannes Schindelin via GitGitGadget
2019-10-21 19:59   ` [PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization Johannes Schindelin via GitGitGadget
2019-10-21 19:59   ` [PATCH v2 2/2] ci(visual-studio): actually run the tests in parallel Johannes Schindelin via GitGitGadget
2019-10-23  2:06   ` [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests Junio C Hamano
2019-10-24 23:23     ` Johannes Schindelin

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).