build: upload windows toolchain profile (#21327)

This commit uploads the output of the windows toolchain profiler.
The windows toolchain profiler is aimed at allowing the compilation
of electron release artifacts using the same windows toolchain on user
builder. This combined with the ability of electron of outputting
deterministic build should allow in future to check electron build
artifacts against CI artifacts.

See: 97959b5e5c include windows toolchain profiler (contd #20949)
This commit is contained in:
Andrea Brancaleoni 2020-01-13 20:40:13 +00:00 коммит произвёл John Kleinschmidt
Родитель 32af863e34
Коммит cf497ea478
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -149,7 +149,10 @@ function assetsForVersion (version, validatingRelease) {
`mksnapshot-${version}-mas-x64.zip`,
`mksnapshot-${version}-win32-ia32.zip`,
`mksnapshot-${version}-win32-x64.zip`,
`mksnapshot-${version}-win32-arm64-x64.zip`
`mksnapshot-${version}-win32-arm64-x64.zip`,
`toolchain-profile-${version}-win32-ia32.zip`,
`toolchain-profile-${version}-win32-x64.zip`,
`toolchain-profile-${version}-win32-arm64.zip`
]
if (!validatingRelease) {
patterns.push('SHASUMS256.txt')

Просмотреть файл

@ -16,6 +16,7 @@ sys.path.append(
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../.."))
from io import StringIO
from zipfile import ZipFile
from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \
get_zip_name
from lib.util import get_electron_branding, execute, get_electron_version, \
@ -36,6 +37,7 @@ SYMBOLS_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols')
DSYM_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'dsym')
PDB_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'pdb')
DEBUG_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'debug')
TOOLCHAIN_PROFILE_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'toolchain-profile')
def main():
@ -122,6 +124,12 @@ def main():
if PLATFORM == 'win32':
run_python_upload_script('upload-node-headers.py', '-v', args.version)
if PLATFORM == 'win32':
toolchain_profile_zip = os.path.join(OUT_DIR, TOOLCHAIN_PROFILE_NAME)
with ZipFile(toolchain_profile_zip, 'w') as myzip:
myzip.write(os.path.join(OUT_DIR, 'windows_toolchain_profile.json'), 'toolchain_profile.json')
upload_electron(release, toolchain_profile_zip, args)
def parse_args():
parser = argparse.ArgumentParser(description='upload distribution file')