diff mbox

[ovs-dev] travis: parallel builds and tests

Message ID 20170810204119.25047-1-lrichard@redhat.com
State Accepted
Headers show

Commit Message

Lance Richardson Aug. 10, 2017, 8:41 p.m. UTC
Some recent travis builds have failed due to having exceeded the
per-job time limit of 50 minutes. This change enables parallel
builds and parallel test execution in order to reduce overall
execution time, and will hopefully allow this class of build
failures to be avoided.

Since the travis build environment is provisioned with two CPUs,
use -j2 for builds and -j4 for tests. Testing in a cloned repository
shows slightly more than a 50% reduction in overall test time.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
 .travis/linux-build.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Ben Pfaff Aug. 10, 2017, 8:47 p.m. UTC | #1
On Thu, Aug 10, 2017 at 04:41:19PM -0400, Lance Richardson wrote:
> Some recent travis builds have failed due to having exceeded the
> per-job time limit of 50 minutes. This change enables parallel
> builds and parallel test execution in order to reduce overall
> execution time, and will hopefully allow this class of build
> failures to be avoided.
> 
> Since the travis build environment is provisioned with two CPUs,
> use -j2 for builds and -j4 for tests. Testing in a cloned repository
> shows slightly more than a 50% reduction in overall test time.
> 
> Signed-off-by: Lance Richardson <lrichard@redhat.com>

Thanks, applied to master.

If this makes the master build finish reliably then I'll gladly apply it
to branch-2.8 also.
Ben Pfaff Aug. 11, 2017, 3:56 p.m. UTC | #2
On Thu, Aug 10, 2017 at 01:47:26PM -0700, Ben Pfaff wrote:
> On Thu, Aug 10, 2017 at 04:41:19PM -0400, Lance Richardson wrote:
> > Some recent travis builds have failed due to having exceeded the
> > per-job time limit of 50 minutes. This change enables parallel
> > builds and parallel test execution in order to reduce overall
> > execution time, and will hopefully allow this class of build
> > failures to be avoided.
> > 
> > Since the travis build environment is provisioned with two CPUs,
> > use -j2 for builds and -j4 for tests. Testing in a cloned repository
> > shows slightly more than a 50% reduction in overall test time.
> > 
> > Signed-off-by: Lance Richardson <lrichard@redhat.com>
> 
> Thanks, applied to master.
> 
> If this makes the master build finish reliably then I'll gladly apply it
> to branch-2.8 also.

This seemed to reduce the aggregate build time as reported by travis
from almost 5 hours to a little over 3 hours, so I applied it to
branch-2.8.

Thanks a lot!
Lance Richardson Aug. 30, 2017, 1:39 p.m. UTC | #3
Travis-CI builds for branches 2.6 and 2.7 are also failing due to the
50 minute per-job limit, perhaps this should be back-ported to those
branches as well.

Regards,

   Lance

----- Original Message -----
> From: "Lance Richardson" <lrichard@redhat.com>
> To: dev@openvswitch.org
> Sent: Thursday, August 10, 2017 4:41:19 PM
> Subject: [ovs-dev] [PATCH] travis: parallel builds and tests
> 
> Some recent travis builds have failed due to having exceeded the
> per-job time limit of 50 minutes. This change enables parallel
> builds and parallel test execution in order to reduce overall
> execution time, and will hopefully allow this class of build
> failures to be avoided.
> 
> Since the travis build environment is provisioned with two CPUs,
> use -j2 for builds and -j4 for tests. Testing in a cloned repository
> shows slightly more than a 50% reduction in overall test time.
> 
> Signed-off-by: Lance Richardson <lrichard@redhat.com>
> ---
>  .travis/linux-build.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index d6f610ea1..bc7c7087d 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -102,16 +102,16 @@ if [ "$KERNEL" ] && [ ! "$TESTSUITE" ] && [ ! "$DPDK"
> ]; then
>  fi
>  
>  if [ "$CC" = "clang" ]; then
> -    make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
> +    make -j2 CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
>  elif [[ $BUILD_ENV =~ "-m32" ]]; then
>      # Disable sparse for 32bit builds on 64bit machine
> -    make CFLAGS="$CFLAGS $BUILD_ENV"
> +    make -j2 CFLAGS="$CFLAGS $BUILD_ENV"
>  else
> -    make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
> +    make -j2 CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
>  fi
>  
>  if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
> -    if ! make distcheck RECHECK=yes; then
> +    if ! make distcheck TESTSUITEFLAGS=-j4 RECHECK=yes; then
>          # testsuite.log is necessary for debugging.
>          cat */_build/tests/testsuite.log
>          exit 1
> --
> 2.13.4
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Aug. 30, 2017, 2:54 p.m. UTC | #4
OK, done, thanks for the suggestion.

On Wed, Aug 30, 2017 at 09:39:06AM -0400, Lance Richardson wrote:
> Travis-CI builds for branches 2.6 and 2.7 are also failing due to the
> 50 minute per-job limit, perhaps this should be back-ported to those
> branches as well.
> 
> Regards,
> 
>    Lance
> 
> ----- Original Message -----
> > From: "Lance Richardson" <lrichard@redhat.com>
> > To: dev@openvswitch.org
> > Sent: Thursday, August 10, 2017 4:41:19 PM
> > Subject: [ovs-dev] [PATCH] travis: parallel builds and tests
> > 
> > Some recent travis builds have failed due to having exceeded the
> > per-job time limit of 50 minutes. This change enables parallel
> > builds and parallel test execution in order to reduce overall
> > execution time, and will hopefully allow this class of build
> > failures to be avoided.
> > 
> > Since the travis build environment is provisioned with two CPUs,
> > use -j2 for builds and -j4 for tests. Testing in a cloned repository
> > shows slightly more than a 50% reduction in overall test time.
> > 
> > Signed-off-by: Lance Richardson <lrichard@redhat.com>
> > ---
> >  .travis/linux-build.sh | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> > index d6f610ea1..bc7c7087d 100755
> > --- a/.travis/linux-build.sh
> > +++ b/.travis/linux-build.sh
> > @@ -102,16 +102,16 @@ if [ "$KERNEL" ] && [ ! "$TESTSUITE" ] && [ ! "$DPDK"
> > ]; then
> >  fi
> >  
> >  if [ "$CC" = "clang" ]; then
> > -    make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
> > +    make -j2 CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
> >  elif [[ $BUILD_ENV =~ "-m32" ]]; then
> >      # Disable sparse for 32bit builds on 64bit machine
> > -    make CFLAGS="$CFLAGS $BUILD_ENV"
> > +    make -j2 CFLAGS="$CFLAGS $BUILD_ENV"
> >  else
> > -    make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
> > +    make -j2 CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
> >  fi
> >  
> >  if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
> > -    if ! make distcheck RECHECK=yes; then
> > +    if ! make distcheck TESTSUITEFLAGS=-j4 RECHECK=yes; then
> >          # testsuite.log is necessary for debugging.
> >          cat */_build/tests/testsuite.log
> >          exit 1
> > --
> > 2.13.4
> > 
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> > 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox

Patch

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index d6f610ea1..bc7c7087d 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -102,16 +102,16 @@  if [ "$KERNEL" ] && [ ! "$TESTSUITE" ] && [ ! "$DPDK" ]; then
 fi
 
 if [ "$CC" = "clang" ]; then
-    make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
+    make -j2 CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
 elif [[ $BUILD_ENV =~ "-m32" ]]; then
     # Disable sparse for 32bit builds on 64bit machine
-    make CFLAGS="$CFLAGS $BUILD_ENV"
+    make -j2 CFLAGS="$CFLAGS $BUILD_ENV"
 else
-    make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
+    make -j2 CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
 fi
 
 if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
-    if ! make distcheck RECHECK=yes; then
+    if ! make distcheck TESTSUITEFLAGS=-j4 RECHECK=yes; then
         # testsuite.log is necessary for debugging.
         cat */_build/tests/testsuite.log
         exit 1