[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 3 commits: refactoring

Holger Levsen (@holger) gitlab at salsa.debian.org
Tue Jul 20 12:21:42 BST 2021



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
cbe70010 by Holger Levsen at 2021-07-20T13:12:50+02:00
refactoring

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
4fa74bde by Holger Levsen at 2021-07-20T13:19:17+02:00
build with less parallelism on i386 to reduce load

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
be7a86fd by Holger Levsen at 2021-07-20T13:21:29+02:00
document parallelism used on i386

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- bin/reproducible_build.sh
- bin/reproducible_common.sh


Changes:

=====================================
bin/reproducible_build.sh
=====================================
@@ -557,15 +557,22 @@ first_build() {
 	echo "Date:     $(date)"
 	echo "Date UTC: $(date -u)"
 	echo "============================================================================="
-	if [ "${ARCH}" = "armhf" ]; then
-		# Reduce parallelism on armhf systems with a lot of cores to
-		# reduce swapping on highly parallel builds. Also ensure first
-		# build is always an odd number of CPUs for good measure.
-		case $NUM_CPU in
-			2|4) NUM_CPU=3 ;;
-			*) NUM_CPU=5 ;;
-		esac
-	fi
+	case ${ARCH} in
+		armhf)
+			# Reduce parallelism on armhf systems with a lot of cores to
+			# reduce swapping on highly parallel builds. Also ensure first
+			# build is always an odd number of CPUs for good measure.
+			case $NUM_CPU in
+				2|4) NUM_CPU=3 ;;
+				*) NUM_CPU=5 ;;
+			esac
+			;;
+		i386)
+			# reduce load on i386 nodes
+			let NUM_CPU-=2
+			;;
+		*)	;;
+	esac
 	# Temporarily disable fixfilepath on bullseye, to get better data about:
 	# https://tests.reproducible-builds.org/debian/issues/unstable/ftbfs_due_to_f-file-prefix-map_issue.html
 	case "${SUITE}" in
@@ -645,14 +652,21 @@ second_build() {
 	set -x
 	local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR)
 	# on amd64+i386 we vary this based on node choices (by design)
-	if [ "${ARCH}" = "armhf" ]; then
-		# Reduce parallelism on armhf systems with a lot of cores to
-		# reduce swapping on highly parallel builds. Keep second build
-		# with even number of cores.
-		case $NUM_CPU in
-			8) NUM_CPU=6 ;;
-		esac
-	fi
+	case ${ARCH} in
+		armhf)
+			# Reduce parallelism on armhf systems with a lot of cores to
+			# reduce swapping on highly parallel builds. Keep second build
+			# with even number of cores.
+			case $NUM_CPU in
+				8) NUM_CPU=6 ;;
+			esac
+			;;
+		i386)
+			# reduce load on i386 nodes
+			let NUM_CPU-=3
+			;;
+		*)	;;
+	esac
 	# differ locale+language depending on the architecture (mostly for readability by different people…)
 	case $ARCH in
 		armhf)	locale=it_CH


=====================================
bin/reproducible_common.sh
=====================================
@@ -510,7 +510,7 @@ write_variation_table() {
 		write_page "<tr><td>build path</td><td>/build/1st/\$pkg-\$ver <em>(Only varied for unstable/experimental)</em></td><td>/build/2/\$pkg-\$ver/2nd <em>(Only varied for unstable/experimental)</em></td></tr>"
 		write_page "<tr><td>user's login shell</td><td>/bin/sh</td><td>/bin/bash</td></tr>"
 		write_page "<tr><td>user's <a href="https://en.wikipedia.org/wiki/Gecos_field">GECOS</a></td><td>first user,first room,first work-phone,first home-phone,first other</td><td>second user,second room,second work-phone,second home-phone,second other</td></tr>"
-		write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=XXX\"<br />  XXX on amd64: 16 or 15<br />  XXX on i386: 10 or 9<br />  XXX on armhf: 5 or 3</td><td>DEB_BUILD_OPTIONS=\"parallel=YYY\"<br />  YYY on amd64: 16 or 15 (!= the first build)<br />  YYY on i386: 10 or 9 (!= the first build)<br />  YYY is the same as XXX on arm64<br />  YYY on armhf: 2, 4, or 6</td></tr>"
+		write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=XXX\"<br />  XXX on amd64: 16 or 15<br />  XXX on i386: 16 or 8<br />  XXX on armhf: 5 or 3</td><td>DEB_BUILD_OPTIONS=\"parallel=YYY\"<br />  YYY on amd64: 16 or 15 (!= the first build)<br />  YYY on i386: 15 or 7 (!= the first build)<br />  YYY is the same as XXX on arm64<br />  YYY on armhf: 2, 4, or 6</td></tr>"
 		write_page "<tr><td>UTS namespace</td><td><em>shared with the host</em></td><td><em>modified using</em> /usr/bin/unshare --uts</td></tr>"
 	elif [ "$1" = "Arch Linux" ]  ; then
 		write_page "<tr><td>env USER</td><td>jenkins</td><td>build 2</td></tr>"



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/492cf28bcc29ca31cfa0a37d938ca9fffbdedd41...be7a86fd5d44e04e4c0531b4dfda1ab99440314d

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/492cf28bcc29ca31cfa0a37d938ca9fffbdedd41...be7a86fd5d44e04e4c0531b4dfda1ab99440314d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20210720/a0f71043/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list