Fix snapshots being configured with ignore_updates=true

By moving appimages to their own build jobs. This required restructuring prepare.py again: release and debug jobs are not configured in pairs anymore.
This commit is contained in:
Tamás Bálint Misius
2022-11-03 07:05:31 +01:00
parent b568b11927
commit 9b76c0dfe2
3 changed files with 105 additions and 111 deletions

146
.github/prepare.py vendored
View File

@@ -45,77 +45,97 @@ with open('.github/mod_id.txt') as f:
build_matrix = []
publish_matrix = []
# consider disabling line wrapping to edit this monstrosity
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, build_package in [
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-18.04', '', True, True, '.dbg', 'x86_64-lin-gcc-static', True ),
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-18.04', '', False, False, None, '', False ),
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-20.04', '', False, True, '.dbg', '', False ), # ubuntu-20.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them
( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, '', False ),
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, True, '.dbg', '', False ),
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, '', False ),
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', 'x86_64-win-msvc-static', False ),
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, '', False ),
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', 'i686-win-msvc-static', False ),
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, '', False ),
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-11.0', '', True, True, None, 'x86_64-mac-gcc-static', False ), # I have no idea how to separate debug info on macos
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-11.0', '', False, False, None, '', False ),
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-11.0', '', True, True, None, 'arm64-mac-gcc-static', False ),
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-11.0', '', False, False, None, '', False ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', 'i686-and-gcc-static', False ),
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', 'x86_64-and-gcc-static', False ),
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', 'arm-and-gcc-static', False ),
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', 'arm64-and-gcc-static', False ),
for arch, platform, libc, statdyn, bplatform, runson, suffix, publish, artifact, dbgsuffix, mode, starcatcher, dbgrel in [
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-18.04', '', False, False, None, None, None, 'debug' ),
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-18.04', '', True, True, '.dbg', None, 'x86_64-lin-gcc-static', 'release' ),
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-18.04', '', False, True, '.dbg', 'appimage', None, 'release' ),
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-18.04', '', False, False, None, None, None, 'debug' ),
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-18.04', '', False, False, None, None, None, 'release' ),
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'debug' ), # ubuntu-20.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-20.04', '', False, True, '.dbg', None, None, 'release' ), # ubuntu-20.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them
( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'debug' ),
( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'release' ),
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug' ),
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, True, '.dbg', None, None, 'release' ),
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug' ),
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release' ),
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug' ),
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None,'x86_64-win-msvc-static', 'release' ),
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug' ),
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release' ),
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug' ),
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None, 'i686-win-msvc-static', 'release' ),
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug' ),
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release' ),
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-11.0', '', False, False, None, None, None, 'debug' ),
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-11.0', '', True, True, None, None, 'x86_64-mac-gcc-static', 'release' ), # I have no idea how to separate debug info on macos
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-11.0', '', False, False, None, None, None, 'debug' ),
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-11.0', '', False, False, None, None, None, 'release' ),
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-11.0', '', False, False, None, None, None, 'debug' ),
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-11.0', '', True, True, None, None, 'arm64-mac-gcc-static', 'release' ),
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-11.0', '', False, False, None, None, None, 'debug' ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-11.0', '', False, False, None, None, None, 'release' ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', False, False, None, None, None, 'debug' ),
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', None, 'i686-and-gcc-static', 'release' ),
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', False, False, None, None, None, 'debug' ),
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', None, 'x86_64-and-gcc-static', 'release' ),
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', False, False, None, None, None, 'debug' ),
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', None, 'arm-and-gcc-static', 'release' ),
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', False, False, None, None, None, 'debug' ),
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-18.04', '.apk', True, True, '.dbg', None, 'arm64-and-gcc-static', 'release' ),
]:
if not mode:
mode = 'default'
separate_debug = True
if not debug_suffix:
debug_suffix = ''
if not dbgsuffix:
dbgsuffix = 'BOGUS'
separate_debug = False
if not starcatcher:
starcatcher = 'BOGUS'
if publish:
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}'
package_asset_path = f'The_Powder_Toy-{bsh_host_arch}.AppImage'
package_asset_name = f'The_Powder_Toy-{bsh_host_arch}.AppImage'
package_debug_asset_path = f'The_Powder_Toy-{bsh_host_arch}.AppImage.dbg'
package_debug_asset_name = f'The_Powder_Toy-{bsh_host_arch}.AppImage.dbg'
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
'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
'bsh_debug_release': debug_release, # part of the unique portion of the matrix
'runs_on': runs_on,
'package_suffix': package_suffix,
'publish': publish_release and 'yes' or 'no',
'artifact': artifact_release and 'yes' or 'no',
'separate_debug': separate_debug and 'yes' or 'no',
'build_package': build_package and 'yes' or 'no',
if dbgrel != 'release':
assert not publish
assert not artifact
asset_path = f'powder{suffix}'
asset_name = f'powder-{release_name}-{arch}-{platform}-{libc}{suffix}'
debug_asset_path = f'powder{dbgsuffix}'
debug_asset_name = f'powder-{release_name}-{arch}-{platform}-{libc}{dbgsuffix}'
if mode == 'appimage':
asset_path = f'The_Powder_Toy-{arch}.AppImage'
asset_name = f'The_Powder_Toy-{arch}.AppImage'
debug_asset_path = f'The_Powder_Toy-{arch}.AppImage.dbg'
debug_asset_name = f'The_Powder_Toy-{arch}.AppImage.dbg'
starcatcher_name = f'powder-{release_name}-{starcatcher}{suffix}'
build_matrix.append({
'bsh_build_platform': bplatform, # part of the unique portion of the matrix
'bsh_host_arch': arch, # part of the unique portion of the matrix
'bsh_host_platform': platform, # part of the unique portion of the matrix
'bsh_host_libc': libc, # part of the unique portion of the matrix
'bsh_static_dynamic': statdyn, # part of the unique portion of the matrix
'bsh_debug_release': dbgrel, # part of the unique portion of the matrix
'runs_on': runson,
'package_suffix': suffix,
'package_mode': mode,
'publish': publish and 'yes' or 'no',
'artifact': artifact and 'yes' or 'no',
'separate_debug': separate_debug and 'yes' or 'no',
'asset_path': asset_path,
'asset_name': asset_name,
'debug_asset_path': debug_asset_path,
'debug_asset_name': debug_asset_name,
})
if publish:
publish_matrix.append({
'bsh_build_platform': bplatform, # part of the unique portion of the matrix
'bsh_host_arch': arch, # part of the unique portion of the matrix
'bsh_host_platform': platform, # part of the unique portion of the matrix
'bsh_host_libc': libc, # part of the unique portion of the matrix
'bsh_static_dynamic': statdyn, # part of the unique portion of the matrix
'asset_path': asset_path,
'asset_name': asset_name,
'debug_asset_path': debug_asset_path,
'debug_asset_name': debug_asset_name,
'package_asset_path': package_asset_path,
'package_asset_name': package_asset_name,
'package_debug_asset_path': package_debug_asset_path,
'package_debug_asset_name': package_debug_asset_name,
'starcatcher_name': starcatcher_name,
})
if publish_release:
publish_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
'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': asset_path,
'asset_name': asset_name,
'starcatcher_name': starcatcher_name,
})
set_output('build_matrix', json.dumps({ 'include': build_matrix }))
set_output('publish_matrix', json.dumps({ 'include': publish_matrix }))