Skip to content

Commit a3d4a2a

Browse files
authored
Merge af8f88b into 49168d5
2 parents 49168d5 + af8f88b commit a3d4a2a

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

appveyor/scripts/setSconsArgs.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ if(!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
1515
$sconsArgs += " certFile=appveyor\authenticode.pfx certTimestampServer=http://timestamp.digicert.com"
1616
}
1717
$sconsArgs += " version_build=$env:APPVEYOR_BUILD_NUMBER"
18+
# Use only 1 concurrent job when building
19+
$sconsArgs += "-j1"
1820
# We use cmd to run scons because PowerShell throws exceptions if warnings get dumped to stderr.
1921
# It's possible to work around this, but the workarounds have annoying side effects.
2022
Set-AppveyorBuildVariable "sconsOutTargets" $sconsOutTargets

sconstruct

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import sys
88
import os
99
import platform
10+
import multiprocessing
1011

1112
# Ensure we are inside the Python virtual environment.
1213
nvdaVenv = os.getenv("NVDA_VENV")
@@ -121,9 +122,14 @@ env = Environment(variables=vars,HOST_ARCH='x86',tools=[
121122
"recursiveInstall"
122123
])
123124

124-
# speed up subsiquent runs by checking timestamps of targets and dependencies, and only using md5 if timestamps differ.
125+
# speed up subsequent runs by checking timestamps of targets and dependencies, and only using md5 if timestamps differ.
125126
env.Decider('MD5-timestamp')
126127

128+
# Make sure to run the build on multiple threads so it runs faster
129+
env.SetOption('num_jobs', multiprocessing.cpu_count())
130+
realNumJobs = env.GetOption('num_jobs')
131+
print(f"Building using {realNumJobs} job{'s' if realNumJobs != 1 else ''}")
132+
127133
#Make our recursiveCopy function available to any script using this environment
128134
env.AddMethod(recursiveCopy)
129135

0 commit comments

Comments
 (0)