Retry the Linux ARM build as it is pretty flaky

This commit is contained in:
Kovid Goyal 2021-12-22 07:45:10 +05:30
parent b965fb4806
commit ee166c5555
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -59,7 +59,14 @@ def call(*cmd: str, cwd: Optional[str] = None, echo: bool = False) -> None:
def run_build(args: Any) -> None:
for x in ('64', '32', 'arm64'):
call(f'python ../bypy linux --arch {x} program', echo=True)
try:
call(f'python ../bypy linux --arch {x} program', echo=True)
except Exception:
if x != 'arm64':
raise
print('Linux ARM build failed, retrying in a few seconds...', file=sys.stderr)
time.sleep(5)
call(f'python ../bypy linux --arch {x} program', echo=True)
call(f'python ../bypy linux --arch {x} shutdown', echo=True)
call('python ../bypy macos program --sign-installers --notarize', echo=True)
call('python ../bypy macos shutdown')