ci: Fix timeout when generating breakpad symbols (#15126)
* ci: breakup dump symbols into multiple steps. * Update step-zip-symbols
This commit is contained in:
parent
a82bcc7e3c
commit
047cad1a4d
3 changed files with 40 additions and 17 deletions
|
@ -311,20 +311,30 @@ step-mksnapshot-store: &step-mksnapshot-store
|
|||
path: src/out/Default/mksnapshot.zip
|
||||
destination: mksnapshot.zip
|
||||
|
||||
step-generate-breakpad-symbols: &step-generate-breakpad-symbols
|
||||
step-build-dump-syms: &step-build-dump-syms
|
||||
run:
|
||||
name: Generate breakpad symbols
|
||||
environment:
|
||||
# TODO(alexeykuzmin): Explicitly pass an out folder path to the scripts.
|
||||
ELECTRON_OUT_DIR: Default
|
||||
name: Build dump_syms binary
|
||||
command: |
|
||||
cd src
|
||||
|
||||
# Build needed dump_syms executable
|
||||
ninja -C out/Default third_party/breakpad:dump_syms
|
||||
|
||||
electron/script/dump-symbols.py -d "$PWD/out/Default/electron.breakpad.syms"
|
||||
electron/script/zip-symbols.py
|
||||
step-generate-breakpad-symbols: &step-generate-breakpad-symbols
|
||||
run:
|
||||
name: Generate breakpad symbols
|
||||
command: |
|
||||
cd src
|
||||
export BUILD_PATH="$PWD/out/Default"
|
||||
export DEST_PATH="$BUILD_PATH/electron.breakpad.syms"
|
||||
electron/script/dump-symbols.py -b $BUILD_PATH -d $DEST_PATH -v
|
||||
|
||||
step-zip-symbols: &step-zip-symbols
|
||||
run:
|
||||
name: Zip symbols
|
||||
command: |
|
||||
cd src
|
||||
export BUILD_PATH="$PWD/out/Default"
|
||||
electron/script/zip-symbols.py -b $BUILD_PATH
|
||||
|
||||
step-maybe-native-mksnapshot-gn-gen: &step-maybe-native-mksnapshot-gn-gen
|
||||
run:
|
||||
|
@ -458,7 +468,9 @@ steps-electron-build-for-tests: &steps-electron-build-for-tests
|
|||
|
||||
# Breakpad symbols.
|
||||
# TODO(alexeykuzmin): We should do it only in nightly builds.
|
||||
- *step-build-dump-syms
|
||||
- *step-generate-breakpad-symbols
|
||||
- *step-zip-symbols
|
||||
|
||||
# Trigger tests on arm hardware if needed
|
||||
- *step-maybe-trigger-arm-test
|
||||
|
@ -479,7 +491,9 @@ steps-electron-build-for-publish: &steps-electron-build-for-publish
|
|||
- *step-maybe-electron-dist-strip
|
||||
- *step-electron-dist-build
|
||||
- *step-electron-dist-store
|
||||
- *step-build-dump-syms
|
||||
- *step-generate-breakpad-symbols
|
||||
- *step-zip-symbols
|
||||
|
||||
# mksnapshot
|
||||
- *step-mksnapshot-build
|
||||
|
|
|
@ -78,8 +78,7 @@ def generate_posix_symbols(binary, source_root, build_dir, destination):
|
|||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Create breakpad symbols')
|
||||
parser.add_argument('-b', '--build-dir',
|
||||
help='Path to an Electron build folder. \
|
||||
Relative to the --source-root.',
|
||||
help='Path to an Electron build folder.',
|
||||
default=RELEASE_PATH,
|
||||
required=False)
|
||||
parser.add_argument('-d', '--destination',
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
|
@ -17,29 +18,38 @@ def main():
|
|||
if get_target_arch() == 'mips64el':
|
||||
return
|
||||
|
||||
args = parse_args()
|
||||
dist_name = 'symbols.zip'
|
||||
zip_file = os.path.join(OUT_DIR, dist_name)
|
||||
zip_file = os.path.join(args.build_dir, dist_name)
|
||||
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']
|
||||
|
||||
with scoped_cwd(OUT_DIR):
|
||||
with scoped_cwd(args.build_dir):
|
||||
dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)]
|
||||
print('Making symbol zip: ' + zip_file)
|
||||
make_zip(zip_file, licenses, dirs)
|
||||
|
||||
if PLATFORM == 'darwin':
|
||||
dsym_name = 'dsym.zip'
|
||||
with scoped_cwd(OUT_DIR):
|
||||
with scoped_cwd(args.build_dir):
|
||||
dsyms = glob.glob('*.dSYM')
|
||||
dsym_zip_file = os.path.join(OUT_DIR, dsym_name)
|
||||
dsym_zip_file = os.path.join(args.build_dir, dsym_name)
|
||||
print('Making dsym zip: ' + dsym_zip_file)
|
||||
make_zip(dsym_zip_file, licenses, dsyms)
|
||||
elif PLATFORM == 'win32':
|
||||
pdb_name = 'pdb.zip'
|
||||
with scoped_cwd(OUT_DIR):
|
||||
with scoped_cwd(args.build_dir):
|
||||
pdbs = glob.glob('*.pdb')
|
||||
pdb_zip_file = os.path.join(OUT_DIR, pdb_name)
|
||||
pdb_zip_file = os.path.join(args.build_dir, pdb_name)
|
||||
print('Making pdb zip: ' + pdb_zip_file)
|
||||
make_zip(pdb_zip_file, pdbs + licenses, [])
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Zip symbols')
|
||||
parser.add_argument('-b', '--build-dir',
|
||||
help='Path to an Electron build folder.',
|
||||
default=OUT_DIR,
|
||||
required=False)
|
||||
return parser.parse_args()
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
sys.exit(main())
|
||||
|
|
Loading…
Add table
Reference in a new issue