Skip to content

Commit e1e3f95

Browse files
authored
Merge pull request #517 from teeminus/update
2 parents 8e4c26f + 451cce7 commit e1e3f95

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

.github/actions/stage/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function run() {
2828
await io.rmRF('C:\\ungoogled-chromium-windows\\build\\artifacts.zip');
2929
}
3030

31-
const args = ['build.py', '--ci']
31+
const args = ['build.py', '--ci', '-j', '2']
3232
if (x86)
3333
args.push('--x86')
3434
if (arm)

build.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ def main():
123123
default=USE_REGISTRY,
124124
help=('Command or path to WinRAR\'s "winrar.exe" binary. If "_use_registry" is '
125125
'specified, determine the path from the registry. Default: %(default)s'))
126+
parser.add_argument(
127+
'-j',
128+
type=int,
129+
dest='thread_count',
130+
help=('Number of CPU threads to use for compiling'))
126131
parser.add_argument(
127132
'--ci',
128133
action='store_true'
@@ -300,16 +305,25 @@ def main():
300305
sys.executable,
301306
'tools\\rust\\build_bindgen.py', '--skip-test')
302307

308+
# Ninja commandline
309+
ninja_commandline = ['third_party\\ninja\\ninja.exe']
310+
if args.thread_count is not None:
311+
ninja_commandline.append('-j')
312+
ninja_commandline.append(args.thread_count)
313+
ninja_commandline.append('-C')
314+
ninja_commandline.append('out\\Default')
315+
ninja_commandline.append('chrome')
316+
ninja_commandline.append('chromedriver')
317+
ninja_commandline.append('mini_installer')
318+
303319
# Run ninja
304320
if args.ci:
305-
_run_build_process_timeout('third_party\\ninja\\ninja.exe', '-C', 'out\\Default', 'chrome',
306-
'chromedriver', 'mini_installer', timeout=3.5*60*60)
321+
_run_build_process_timeout(*ninja_commandline, timeout=3.5*60*60)
307322
# package
308323
os.chdir(_ROOT_DIR)
309324
subprocess.run([sys.executable, 'package.py'])
310325
else:
311-
_run_build_process('third_party\\ninja\\ninja.exe', '-C', 'out\\Default', 'chrome',
312-
'chromedriver', 'mini_installer')
326+
_run_build_process(*ninja_commandline)
313327

314328

315329
if __name__ == '__main__':

revision.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
2

0 commit comments

Comments
 (0)