]> granicus.if.org Git - libjpeg-turbo/commitdiff
Travis: Limit parallel make jobs to # of CPU cores
authorDRC <information@libjpeg-turbo.org>
Mon, 11 Sep 2017 14:48:33 +0000 (09:48 -0500)
committerDRC <information@libjpeg-turbo.org>
Mon, 11 Sep 2017 14:48:33 +0000 (09:48 -0500)
This tends to be faster than 'make -j', since it is making more wise
use of the available resources.

.travis.yml

index c1e36bdc9617ede5fc166fda27cce64cfc17965b..78f113aa51943ba2deeb00779a4798bdc269f309 100644 (file)
@@ -84,7 +84,8 @@ script:
       mkdir build &&
       pushd build &&
       ../configure ${CONFIGURE_FLAGS} &&
-      make -j &&
+      export NUMCPUS=`grep -c '^processor' /proc/cpuinfo` &&
+      make -j$NUMCPUS --load-average=$NUMCPUS &&
       if [[ "${CONFIGURE_FLAGS}" =~ "with-12bit" ||
             "${CONFIGURE_FLAGS}" =~ "without-simd" ]]; then
         make test FLOATTEST=32bit;