зеркало из https://github.com/electron/electron.git
chore: update mksnapshot and ffmpeg for GN (#14738)
* chore: update mksnapshot and ffmpeg for GN
* fix typo
* add non-native builds to CI
* split mksnapshot build and store steps
* Fix config order
* Use different targets for mksnapshot and native_mksnapshot
mksnapshot gets built in electron_app as part of the v8 build, so copy it from there
* Revert "Use different targets for mksnapshot and native_mksnapshot"
This reverts commit 6a1a50aa69
.
* Try specifying v8_snapshot_toolchain
* Fix v8_snapshot_toolchain reference
* Fix artifact locations
* Test native mksnapshot
This commit is contained in:
Родитель
c7b91acf41
Коммит
2617f50b7d
|
@ -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:
|
||||
|
|
11
BUILD.gn
11
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",
|
||||
|
|
|
@ -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: >-
|
||||
|
|
|
@ -85,3 +85,7 @@ patches:
|
|||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_70c4340.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: expose_mksnapshot.patch
|
||||
description: Needed in order to build mksnapshot on arm.
|
||||
|
|
|
@ -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",
|
||||
]
|
|
@ -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)
|
||||
|
|
5
vsts.yml
5
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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче