Skip to content

Commit

Permalink
Modify the CI script to fall back to nmake if jom is missing
Browse files Browse the repository at this point in the history
Fixes #3629
  • Loading branch information
randombit committed Jul 24, 2023
1 parent b61b900 commit 683e81f
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/scripts/ci_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,20 @@ def have_prog(prog):
return True
return False

def validate_make_tool(make_tool):
if make_tool == '':
return 'make'

if make_tool not in ['nmake', 'jom', 'make']:
raise Exception("Don't know about %s as a make tool" % (make_tool))

# Hack to work around jom occasionally fail to install
# https://github.com/randombit/botan/issues/3629
if make_tool == 'jom' and not have_prog('jom'):
return 'nmake'

return make_tool

def main(args=None):
"""
Parse options, do the things
Expand Down Expand Up @@ -635,13 +649,10 @@ def main(args=None):

cmds.append([py_interp, os.path.join(root_dir, 'configure.py')] + config_flags)

if options.make_tool == '':
options.make_tool = 'make'

make_cmd = [options.make_tool]
make_cmd = [validate_make_tool(options.make_tool)]
if build_dir != '.':
make_cmd = ['indir:%s' % build_dir] + make_cmd
if options.build_jobs > 1 and options.make_tool != 'nmake':
if options.build_jobs > 1 and make_tool != 'nmake':
make_cmd += ['-j%d' % (options.build_jobs)]

make_cmd += ['-k']
Expand Down

0 comments on commit 683e81f

Please sign in to comment.