build: follow naming conventing about binary postfix used by Xash3D (#671)

ci: add builds for apple silicon
This commit is contained in:
jeefo 2025-02-15 15:55:16 +03:00 committed by GitHub
commit abbc5bfc5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 57 additions and 8 deletions

View file

@ -81,7 +81,7 @@ class BotSign(object):
return False
class BotPackage(object):
def __init__(self, name: str, archive: str, artifact: dict, extra: bool = False):
def __init__(self, name: str, archive: str, artifact: dict, extra: bool = False):
self.name = name
self.archive = archive
self.artifact = artifact
@ -133,7 +133,7 @@ class BotRelease(object):
self.pkg_matrix.append (BotPackage('windows', 'exe', {'windows-x86': 'dll'}))
self.pkg_matrix.append (BotPackage('linux', 'tar.xz', {'linux-x86': 'so'}))
self.pkg_matrix.append (BotPackage('extras', 'zip',
{'linux-aarch64': 'so',
{'linux-arm64': 'so',
'linux-amd64': 'so',
'linux-x86-gcc': 'so',
'windows-x86-gcc': 'dll',
@ -141,6 +141,7 @@ class BotRelease(object):
'windows-x86-msvc-xp': 'dll',
'windows-amd64': 'dll',
'darwin-x86': 'dylib',
'darwin-arm64': 'dylib',
}, extra=True))
def create_dirs(self):
@ -255,7 +256,14 @@ class BotRelease(object):
num_artifacts = len(pkg.artifact)
for artifact in pkg.artifact:
binary = os.path.join(self.artifacts, artifact, f'{self.project}.{pkg.artifact[artifact]}')
binary_name = self.project
if artifact.endswith('arm64'):
binary_name = binary_name + '_arm64'
elif artifact.endswith('amd64'):
binary_name = binary_name + '_amd64'
binary = os.path.join(self.artifacts, artifact, f'{binary_name}.{pkg.artifact[artifact]}')
binary_base = os.path.basename(binary)
if not os.path.exists(binary):