[gparted] Parallelise building GParted in GitLab CI jobs (!6)



commit ed06299c18b94c7b6135bea45954e42d9f5ee034
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Fri Jul 6 07:35:10 2018 +0100

    Parallelise building GParted in GitLab CI jobs (!6)
    
    Reduce the time taken by the GitLab Continuous Integration jobs by
    parallelising make to use all available CPUs in the Docker CI image
    when it is building GParted code.  This includes 'make diskcheck'
    because that also does a second build of the GParted code in a separate
    subdirectory.
    
    Closes !6 - Reduce the time taken by the GitLab CI jobs

 .gitlab-ci.yml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7fb62ccd..33d78d66 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,18 +24,22 @@ stages:
   stage: build
   script:
     - ./autogen.sh
-    - make
+    - nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
+    - echo nproc=$nproc
+    - make -j $nproc
     - make install
 
 .test_stage_template: &test_stage_definition
   stage: test
   script:
     - ./autogen.sh
-    - make
+    - nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
+    - echo nproc=$nproc
+    - make -j $nproc
     # Exclude specific unit test which fails without /dev/disk in Docker images.
     - export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
     - make check
-    - make distcheck
+    - make -j $nproc distcheck
 
 # Check GParted can be built and installed on CentOS and Ubuntu.
 centos_build:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]