windows-build: Use number of processors

Extract number of processors using `nproc` command and use it to set
Makeflags and git submodules jobs.

Signed-off-by: markoburcul <marko@status.im>
This commit is contained in:
markoburcul 2024-09-04 09:53:05 +02:00
parent 99a209635b
commit 14b326fbf8
No known key found for this signature in database
GPG Key ID: FC4CD2F9A040D54A
2 changed files with 6 additions and 3 deletions

View File

@ -50,7 +50,8 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
ifeq ($(NIM_PARAMS),)
# "variables.mk" was not included, so we update the submodules.
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
NUMPROC ?= 10
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive --jobs $(NUMPROC)
.DEFAULT:
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
$(GIT_SUBMODULE_UPDATE); \

View File

@ -5,7 +5,7 @@ library 'status-jenkins-lib@v1.9.7'
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'windows && x86_64 && qt-5.15.2 && go-1.21' }
agent { label 'windows && x86_64 && qt-5.15.2 && go-1.21 && win-04' }
parameters {
booleanParam(
@ -66,8 +66,10 @@ pipeline {
environment {
PLATFORM = "windows/${getArch()}"
/* Number of processors on the host*/
NUMPROC = "${sh(script: 'nproc', returnStdout: true).trim()}"
/* Improve make performance */
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
MAKEFLAGS = "-j${env.NUMPROC} V=${params.VERBOSE}"
/* Explicitly set the QT version */
QTDIR = "/c/Qt/5.15.2/msvc2019_64"
PATH = "${env.QTDIR}/bin:${env.PATH}"