Skip to content

Commit

Permalink
build: upload windows toolchain profile (#21327)
Browse files Browse the repository at this point in the history
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: 97959b5 include windows toolchain profiler (contd #20949)
  • Loading branch information
thypon authored and John Kleinschmidt committed Jan 13, 2020
1 parent 32af863 commit cf497ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion script/release/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
8 changes: 8 additions & 0 deletions script/release/uploaders/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
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, \
Expand All @@ -36,6 +37,7 @@
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():
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit cf497ea

Please sign in to comment.