Browse Source

ci: consistently parallelize make jobs

* ci/run-build-and-tests.sh: Use "nproc" instead of
"getconf _NPROCESSORS_ONLN".
* ci/install-dependencies.sh: Use "nproc" to parallelize make jobs.
Dmitry V. Levin 1 month ago
parent
commit
5fb1597f59
2 changed files with 5 additions and 4 deletions
  1. 4
    3
      ci/install-dependencies.sh
  2. 1
    1
      ci/run-build-and-tests.sh

+ 4
- 3
ci/install-dependencies.sh View File

@@ -5,6 +5,7 @@
5 5
 #
6 6
 # SPDX-License-Identifier: GPL-2.0-or-later
7 7
 
8
+j=-j`nproc` || j=
8 9
 type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
9 10
 common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libbluetooth-dev make xz-utils'
10 11
 
@@ -71,7 +72,7 @@ esac
71 72
 case "$KHEADERS" in
72 73
 	*/*)
73 74
 		clone_repo https://github.com/"$KHEADERS" kernel ${KBRANCH-}
74
-		$sudo make -C kernel headers_install INSTALL_HDR_PATH=/opt/kernel
75
+		$sudo make $j -C kernel headers_install INSTALL_HDR_PATH=/opt/kernel
75 76
 		$sudo rm -rf kernel
76 77
 		KHEADERS_INC=/opt/kernel/include
77 78
 		;;
@@ -96,8 +97,8 @@ case "$CC" in
96 97
 					;;
97 98
 			esac
98 99
 			./configure --prefix=/opt/musl --exec-prefix=/usr ${build}
99
-			make
100
-			$sudo make install
100
+			make $j
101
+			$sudo make $j install
101 102
 		cd -
102 103
 		rm -rf musl
103 104
 		$sudo ln -s \

+ 1
- 1
ci/run-build-and-tests.sh View File

@@ -86,7 +86,7 @@ export CC_FOR_BUILD="$CC"
86 86
 	exit $rc
87 87
 }
88 88
 
89
-j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j=
89
+j=-j`nproc` || j=
90 90
 
91 91
 case "${CHECK-}" in
92 92
 	coverage)

Loading…
Cancel
Save