From 928fc047bf034fc78c4ed8ae2dc4656e7dca7ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Tue, 21 Oct 2025 00:13:48 +0200 Subject: [PATCH] chore(ci): use nproc in MAKEFLAGS - instead of hardcoding 4 CPU cores --- ci/Jenkinsfile.android | 1 + ci/Jenkinsfile.ios | 2 +- ci/Jenkinsfile.linux | 2 +- ci/Jenkinsfile.linux-nix | 2 +- ci/Jenkinsfile.macos | 2 +- ci/Jenkinsfile.tests-ui | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 78ddb5d4ae..3605a361db 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -63,6 +63,7 @@ pipeline { /* Control output the filename */ APP_TYPE = "${utils.getAppType()}" PLATFORM = "android/arm64" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" QT_VERSION = "6.9.2" QT_ANDROID_PATH = "/opt/qt/${env.QT_VERSION}/android_arm64_v8a" QMAKE = "/opt/qt/${env.QT_VERSION}/android_arm64_v8a/bin/qmake" diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 80cf3785c2..b4a0917a45 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -45,7 +45,7 @@ pipeline { GOTMPDIR = "${env.WORKSPACE_TMP}" PLATFORM = "ios/${getArch()}" /* Improve make performance */ - MAKEFLAGS = "-j4 V=${params.VERBOSE}" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" QT_VERSION="6.9.2" QMAKE = "/Users/admin/${QT_VERSION}/ios/bin/qmake" QT_HOST_PATH = "/Users/admin/${QT_VERSION}/macos" diff --git a/ci/Jenkinsfile.linux b/ci/Jenkinsfile.linux index 36100bfdfa..f236df0a1f 100644 --- a/ci/Jenkinsfile.linux +++ b/ci/Jenkinsfile.linux @@ -76,7 +76,7 @@ pipeline { environment { PLATFORM = "linux/${getArch()}${(params.USE_NWAKU ?: false) ? '-nwaku' : ''}" /* Improve make performance */ - MAKEFLAGS = "-j4 V=${params.VERBOSE}" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" /* Avoid weird bugs caused by stale cache. */ QML_DISABLE_DISK_CACHE = "true" /* Set USE_NWAKU before VERSION since version.sh uses it */ diff --git a/ci/Jenkinsfile.linux-nix b/ci/Jenkinsfile.linux-nix index 1f636061d3..06a3b38343 100644 --- a/ci/Jenkinsfile.linux-nix +++ b/ci/Jenkinsfile.linux-nix @@ -59,7 +59,7 @@ pipeline { environment { PLATFORM = "linux-nix/${getArch()}" /* Improve make performance */ - MAKEFLAGS = "-j4 V=${params.VERBOSE}" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" /* Avoid weird bugs caused by stale cache. */ QML_DISABLE_DISK_CACHE = "true" /* Control output the filename */ diff --git a/ci/Jenkinsfile.macos b/ci/Jenkinsfile.macos index 6dd8424d36..11b03fb61d 100644 --- a/ci/Jenkinsfile.macos +++ b/ci/Jenkinsfile.macos @@ -70,7 +70,7 @@ pipeline { environment { PLATFORM = "macos/${getArch()}${(params.USE_NWAKU ?: false) ? '-nwaku' : ''}" /* Improve make performance */ - MAKEFLAGS = "-j4 V=${params.VERBOSE}" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" QT_VERSION="6.9.2" QMAKE = "/Users/admin/${QT_VERSION}/macos/bin/qmake" /* QMAKE = sh(script: "which qmake", returnStdout: true).trim() */ diff --git a/ci/Jenkinsfile.tests-ui b/ci/Jenkinsfile.tests-ui index 4c40d037b1..7e836f3308 100644 --- a/ci/Jenkinsfile.tests-ui +++ b/ci/Jenkinsfile.tests-ui @@ -47,7 +47,7 @@ pipeline { environment { PLATFORM = 'tests/ui' /* Improve make performance */ - MAKEFLAGS = "-j4 V=${params.VERBOSE}" + MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}" /* Makefile assumes the compiler folder is included */ QTDIR = "/opt/qt/6.9.2/gcc_64" PATH = "${env.QTDIR}/bin:${env.PATH}"