Also retry building linux arm nightly

This commit is contained in:
Kovid Goyal 2026-02-03 22:36:37 +05:30
parent fac4420804
commit b2c3fd1893
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -81,23 +81,24 @@ def run_build(args: Any) -> None:
m = runpy.run_path('./setup.py', run_name='__publish__')
vcs_rev: str = m['get_vcs_rev']()
def run_with_retry(cmd: str, timeout: float | None = 20 * 60 ) -> None:
def run_with_retry(cmd: str, timeout: float | None = 20 * 60, retry_cmd: str = '') -> None:
try:
call(cmd, echo=True, timeout=timeout)
except (SystemExit, Exception):
needs_retry = building_nightly and 'linux' not in cmd
if not needs_retry:
if not (building_nightly and retry_cmd):
raise
print('Build failed, retrying in a minute seconds...', file=sys.stderr)
if 'macos' in cmd:
call('python ../bypy macos shutdown')
print('Build failed, retrying in a minute...', file=sys.stderr)
call(retry_cmd)
time.sleep(60)
call(cmd, echo=True, timeout=timeout)
for x in ('64', 'arm64'):
for x, retry_cmd in {'64': '', 'arm64': 'pkill -9 qemu-aarch64-static'}.items():
prefix = f'python ../bypy linux --arch {x} '
run_with_retry(prefix + f'program --non-interactive --extra-program-data "{vcs_rev}"')
run_with_retry(f'python ../bypy macos program --sign-installers --notarize --non-interactive --extra-program-data "{vcs_rev}"')
run_with_retry(prefix + f'program --non-interactive --extra-program-data "{vcs_rev}"', retry_cmd=retry_cmd)
run_with_retry(
f'python ../bypy macos program --sign-installers --notarize --non-interactive --extra-program-data "{vcs_rev}"',
retry_cmd='python ../bypy macos shutdown'
)
call('python ../bypy macos shutdown', echo=True)
call('make debug')
call('./setup.py build-static-binaries')