Skip to content

Commit 80c6818

Browse files
committed
chore(ci): use nproc in MAKEFLAGS
- instead of hardcoding 4 CPU cores
1 parent d9a3c19 commit 80c6818

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

ci/Jenkinsfile.android

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pipeline {
5858
APP_TYPE = "${utils.getAppType()}"
5959
STATUS_APK_ARTIFACT = "pkg/${utils.pkgFilename(ext: 'apk', arch: 'arm64', version: env.VERSION, type: env.APP_TYPE)}"
6060
PLATFORM = "android/arm64"
61+
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
6162
QT_VERSION = "6.9.2"
6263
QT_ANDROID_PATH = "/opt/qt/${env.QT_VERSION}/android_arm64_v8a"
6364
QMAKE = "/opt/qt/${env.QT_VERSION}/android_arm64_v8a/bin/qmake"

ci/Jenkinsfile.ios

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pipeline {
4545
GOTMPDIR = "${env.WORKSPACE_TMP}"
4646
PLATFORM = "ios/${getArch()}"
4747
/* Improve make performance */
48-
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
48+
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
4949
QT_VERSION="6.9.2"
5050
QMAKE = "/Users/admin/${QT_VERSION}/ios/bin/qmake"
5151
QT_HOST_PATH = "/Users/admin/${QT_VERSION}/macos"

ci/Jenkinsfile.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pipeline {
7676
environment {
7777
PLATFORM = "linux/${getArch()}${(params.USE_NWAKU ?: false) ? '-nwaku' : ''}"
7878
/* Improve make performance */
79-
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
79+
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
8080
/* Avoid weird bugs caused by stale cache. */
8181
QML_DISABLE_DISK_CACHE = "true"
8282
/* Set USE_NWAKU before VERSION since version.sh uses it */

ci/Jenkinsfile.linux-nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pipeline {
5959
environment {
6060
PLATFORM = "linux-nix/${getArch()}"
6161
/* Improve make performance */
62-
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
62+
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
6363
/* Avoid weird bugs caused by stale cache. */
6464
QML_DISABLE_DISK_CACHE = "true"
6565
/* Control output the filename */

ci/Jenkinsfile.macos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pipeline {
7070
environment {
7171
PLATFORM = "macos/${getArch()}${(params.USE_NWAKU ?: false) ? '-nwaku' : ''}"
7272
/* Improve make performance */
73-
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
73+
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
7474
QT_VERSION="6.9.2"
7575
QMAKE = "/Users/admin/${QT_VERSION}/macos/bin/qmake"
7676
/* QMAKE = sh(script: "which qmake", returnStdout: true).trim() */

ci/Jenkinsfile.tests-ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pipeline {
4747
environment {
4848
PLATFORM = 'tests/ui'
4949
/* Improve make performance */
50-
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
50+
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
5151
/* Makefile assumes the compiler folder is included */
5252
QTDIR = "/opt/qt/6.9.2/gcc_64"
5353
PATH = "${env.QTDIR}/bin:${env.PATH}"

0 commit comments

Comments
 (0)