diff --git a/.github/prepare.py b/.github/prepare.py index 3ce43f83d..362d2e32a 100755 --- a/.github/prepare.py +++ b/.github/prepare.py @@ -40,7 +40,7 @@ with open('.github/mod_id.txt') as f: build_matrix = [] publish_matrix = [] -for bsh_host_arch, bsh_host_platform, bsh_host_libc, bsh_static_dynamic, bsh_build_platform, runs_on, package_suffix, publish, artifact, debug_suffix, starcatcher_name in [ +for bsh_host_arch, bsh_host_platform, bsh_host_libc, bsh_static_dynamic, bsh_build_platform, runs_on, package_suffix, publish, artifact, debug_suffix, starcatcher_suffix in [ ( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-18.04', '', True, True, '.dbg', 'x86_64-lin-gcc-static' ), ( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-18.04', '', False, False, None, '' ), # ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-20.04', '', False, True, '.dbg', '' ), # ubuntu-20.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them @@ -68,6 +68,12 @@ for bsh_host_arch, bsh_host_platform, bsh_host_libc, bsh_static_dynamic, bsh_bui assert artifact for debug_release in [ 'debug', 'release' ]: publish_release = publish and debug_release == 'release' + artifact_release = artifact and debug_release == 'release' + asset_path = f'powder{package_suffix}' + asset_name = f'powder-{release_name}-{bsh_host_arch}-{bsh_host_platform}-{bsh_host_libc}{package_suffix}' + debug_asset_path = f'powder{debug_suffix}' + debug_asset_name = f'powder-{release_name}-{bsh_host_arch}-{bsh_host_platform}-{bsh_host_libc}{debug_suffix}' + starcatcher_name = f'powder-{release_name}-{starcatcher_suffix}{package_suffix}' build_matrix.append({ 'bsh_build_platform': bsh_build_platform, # part of the unique portion of the matrix 'bsh_host_arch': bsh_host_arch, # part of the unique portion of the matrix @@ -78,12 +84,12 @@ for bsh_host_arch, bsh_host_platform, bsh_host_libc, bsh_static_dynamic, bsh_bui 'runs_on': runs_on, 'package_suffix': package_suffix, 'publish': publish_release and 'yes' or 'no', - 'artifact': artifact and 'yes' or 'no', + 'artifact': artifact_release and 'yes' or 'no', 'separate_debug': separate_debug and 'yes' or 'no', - 'asset_path': f'powder{package_suffix}', - 'asset_name': f'powder-{release_name}-{bsh_host_arch}-{bsh_host_platform}-{bsh_host_libc}{package_suffix}', - 'debug_asset_path': f'powder{debug_suffix}', - 'debug_asset_name': f'powder-{release_name}-{bsh_host_arch}-{bsh_host_platform}-{bsh_host_libc}{debug_suffix}', + 'asset_path': asset_path, + 'asset_name': asset_name, + 'debug_asset_path': debug_asset_path, + 'debug_asset_name': debug_asset_name, }) if publish_release: publish_matrix.append({ @@ -92,9 +98,9 @@ for bsh_host_arch, bsh_host_platform, bsh_host_libc, bsh_static_dynamic, bsh_bui 'bsh_host_platform': bsh_host_platform, # part of the unique portion of the matrix 'bsh_host_libc': bsh_host_libc, # part of the unique portion of the matrix 'bsh_static_dynamic': bsh_static_dynamic, # part of the unique portion of the matrix - 'asset_path': f'powder{package_suffix}', - 'asset_name': f'powder-{release_name}-{bsh_host_arch}-{bsh_host_platform}-{bsh_host_libc}{package_suffix}', - 'starcatcher_name': f'powder-{release_name}-{starcatcher_name}{package_suffix}', + 'asset_path': asset_path, + 'asset_name': asset_name, + 'starcatcher_name': starcatcher_name, }) print('::set-output name=build_matrix::' + json.dumps({ 'include': build_matrix }))