diff --git a/.circleci/config.yml b/.circleci/config.yml index 504ae22f87df..d0c7bd1176bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -214,6 +214,18 @@ step-show-sccache-stats: &step-show-sccache-stats name: Check sccache stats after build command: $SCCACHE_PATH -s +step-mksnapshot-build: &step-mksnapshot-build + run: + name: mksnapshot build + command: | + cd src + ninja -C out/Default electron:electron_mksnapshot_zip + +step-mksnapshot-store: &step-mksnapshot-store + store_artifacts: + path: src/out/Default/mksnapshot.zip + destination: mksnapshot.zip + # Lists of steps. steps-checkout: &steps-checkout steps: @@ -277,6 +289,10 @@ steps-electron-build-for-tests: &steps-electron-build-for-tests - *step-electron-dist-build - *step-electron-dist-store + # mksnapshot + - *step-mksnapshot-build + - *step-mksnapshot-store + # chromedriver - *step-electron-chromedriver-build - *step-electron-chromedriver-store @@ -292,7 +308,7 @@ steps-electron-build-for-tests: &steps-electron-build-for-tests - *step-maybe-notify-slack-failure - *step-maybe-notify-slack-success -steps-mksnapshot-build: &steps-mksnapshot-build +steps-native-mksnapshot-build: &steps-native-mksnapshot-build steps: - attach_workspace: at: . @@ -308,10 +324,11 @@ steps-mksnapshot-build: &steps-mksnapshot-build name: native mksnapshot (arm/arm64) build command: | cd src - ninja -C out/native_mksnapshot v8:mksnapshot + ninja -C out/native_mksnapshot electron:electron_mksnapshot_zip + cp out/native_mksnapshot/mksnapshot.zip out/native_mksnapshot/native_mksnapshot.zip - store_artifacts: - path: src/out/native_mksnapshot/mksnapshot - destination: mksnapshot + path: src/out/native_mksnapshot/native_mksnapshot.zip + destination: native_mksnapshot.zip steps-ffmpeg-build: &steps-ffmpeg-build steps: @@ -423,6 +440,10 @@ steps-build-mac: &steps-build-mac - *step-electron-dist-build - *step-electron-dist-store + # mksnapshot + - *step-mksnapshot-build + - *step-mksnapshot-store + # chromedriver - *step-electron-chromedriver-build - *step-electron-chromedriver-store @@ -559,7 +580,7 @@ jobs: <<: *machine-linux-medium environment: <<: *env-arm - <<: *steps-mksnapshot-build + <<: *steps-native-mksnapshot-build linux-arm64-debug: <<: *machine-linux-2xlarge @@ -592,7 +613,7 @@ jobs: <<: *machine-linux-medium environment: <<: *env-arm64 - <<: *steps-mksnapshot-build + <<: *steps-native-mksnapshot-build osx-testing: <<: *machine-mac @@ -705,6 +726,9 @@ workflows: - linux-arm-ffmpeg: requires: - linux-arm-checkout + - linux-arm-mksnapshot: + requires: + - linux-arm-checkout - linux-arm64-debug: requires: @@ -715,6 +739,9 @@ workflows: - linux-arm64-ffmpeg: requires: - linux-arm64-checkout + - linux-arm64-mksnapshot: + requires: + - linux-arm64-checkout build-mac-fork-prs: jobs: diff --git a/BUILD.gn b/BUILD.gn index 10e79c54fa00..6c00b9e42ab5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -9,6 +9,7 @@ import("//third_party/ffmpeg/ffmpeg_options.gni") import("//third_party/widevine/cdm/widevine.gni") import("//tools/grit/repack.gni") import("//tools/v8_context_snapshot/v8_context_snapshot.gni") +import("//v8/snapshot_toolchain.gni") if (is_mac) { import("//build/config/mac/rules.gni") @@ -926,6 +927,16 @@ dist_zip("electron_chromedriver_zip") { ] } +dist_zip("electron_mksnapshot_zip") { + data_deps = [ + "//v8:mksnapshot($v8_snapshot_toolchain)", + ":licenses", + ] + outputs = [ + "$root_build_dir/mksnapshot.zip", + ] +} + group("electron") { deps = [ ":electron_app", diff --git a/appveyor.yml b/appveyor.yml index 7488af3a69bf..3e8fd8c92007 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,11 +27,13 @@ build_script: - gn gen out/Default "--args=import(\"//electron/build/args/%GN_CONFIG%.gn\") %GN_EXTRA_ARGS%" - ninja -C out/Default electron:electron_app - gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%" - - ninja -C out/ffmpeg third_party/ffmpeg + - ninja -C out/ffmpeg electron:electron_ffmpeg_zip - ninja -C out/Default electron:electron_dist_zip + - ninja -C out/Default electron:electron_mksnapshot_zip - ninja -C out/Default electron:electron_chromedriver_zip - appveyor PushArtifact out/Default/dist.zip - appveyor PushArtifact out/Default/chromedriver.zip + - appveyor PushArtifact out/ffmpeg/ffmpeg.zip test_script: - if "%GN_CONFIG%"=="testing" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg ) - ps: >- diff --git a/patches/common/v8/.patches.yaml b/patches/common/v8/.patches.yaml index 96410ed23f30..d2b43ceb7286 100644 --- a/patches/common/v8/.patches.yaml +++ b/patches/common/v8/.patches.yaml @@ -85,3 +85,7 @@ patches: author: Shelley Vohr file: cherry-pick_70c4340.patch description: Node 10.6.0 needs it. +- + author: Shelley Vohr + file: expose_mksnapshot.patch + description: Needed in order to build mksnapshot on arm. diff --git a/patches/common/v8/expose_mksnapshot.patch b/patches/common/v8/expose_mksnapshot.patch new file mode 100644 index 000000000000..b2357d0d4aaa --- /dev/null +++ b/patches/common/v8/expose_mksnapshot.patch @@ -0,0 +1,13 @@ +diff --git a/BUILD.gn b/BUILD.gn +index 30e9ec34cf..fea543df9c 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -2904,8 +2904,6 @@ if (v8_monolithic) { + + if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { + v8_executable("mksnapshot") { +- visibility = [ ":*" ] # Only targets in this file can depend on this. +- + sources = [ + "src/snapshot/mksnapshot.cc", + ] diff --git a/script/upload.py b/script/upload.py index 41c1ca8b733f..74c60314f3ca 100755 --- a/script/upload.py +++ b/script/upload.py @@ -62,8 +62,12 @@ def main(): if get_target_arch() != 'mips64el': upload_electron(release, os.path.join(DIST_DIR, SYMBOLS_NAME), args) if PLATFORM == 'darwin': - upload_electron(release, os.path.join(DIST_DIR, 'electron-api.json'), args) - upload_electron(release, os.path.join(DIST_DIR, 'electron.d.ts'), args) + api_path = os.path.join(SOURCE_ROOT, 'electron-api.json') + upload_electron(release, api_path, args) + + ts_defs_path = os.path.join(SOURCE_ROOT, 'electron.d.ts') + upload_electron(release, ts_defs_path, args) + upload_electron(release, os.path.join(DIST_DIR, DSYM_NAME), args) elif PLATFORM == 'win32': upload_electron(release, os.path.join(DIST_DIR, PDB_NAME), args) diff --git a/vsts.yml b/vsts.yml index 1a9a21403dc9..c02d13adb444 100644 --- a/vsts.yml +++ b/vsts.yml @@ -102,6 +102,11 @@ jobs: ninja -C out/Default electron:electron_chromedriver_zip displayName: Build chromedriver and zip + - bash: | + cd src + ninja -C out/Default electron:electron_mksnapshot_zip + displayName: Build mksnapshot and zip + - task: PublishTestResults@2 displayName: Publish Test Results inputs: