From b2c3fd189363c71ec9a0442a8a67bb120a69287a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 Feb 2026 22:36:37 +0530 Subject: [PATCH] Also retry building linux arm nightly --- publish.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/publish.py b/publish.py index 89af8a2dd..87d911f13 100755 --- a/publish.py +++ b/publish.py @@ -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')