mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 22:44:50 +02:00
Also retry building linux arm nightly
This commit is contained in:
19
publish.py
19
publish.py
@@ -81,23 +81,24 @@ def run_build(args: Any) -> None:
|
|||||||
m = runpy.run_path('./setup.py', run_name='__publish__')
|
m = runpy.run_path('./setup.py', run_name='__publish__')
|
||||||
vcs_rev: str = m['get_vcs_rev']()
|
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:
|
try:
|
||||||
call(cmd, echo=True, timeout=timeout)
|
call(cmd, echo=True, timeout=timeout)
|
||||||
except (SystemExit, Exception):
|
except (SystemExit, Exception):
|
||||||
needs_retry = building_nightly and 'linux' not in cmd
|
if not (building_nightly and retry_cmd):
|
||||||
if not needs_retry:
|
|
||||||
raise
|
raise
|
||||||
print('Build failed, retrying in a minute seconds...', file=sys.stderr)
|
print('Build failed, retrying in a minute...', file=sys.stderr)
|
||||||
if 'macos' in cmd:
|
call(retry_cmd)
|
||||||
call('python ../bypy macos shutdown')
|
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
call(cmd, echo=True, timeout=timeout)
|
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} '
|
prefix = f'python ../bypy linux --arch {x} '
|
||||||
run_with_retry(prefix + f'program --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}"')
|
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('python ../bypy macos shutdown', echo=True)
|
||||||
call('make debug')
|
call('make debug')
|
||||||
call('./setup.py build-static-binaries')
|
call('./setup.py build-static-binaries')
|
||||||
|
|||||||
Reference in New Issue
Block a user