Merge pull request #14708 from electron/updates-for-gn-release
build: Updates for GN release builds
This commit is contained in:
commit
b3e469fa98
6 changed files with 100 additions and 12 deletions
|
@ -140,6 +140,18 @@ step-electron-dist-store: &step-electron-dist-store
|
||||||
path: src/out/Default/dist.zip
|
path: src/out/Default/dist.zip
|
||||||
destination: dist.zip
|
destination: dist.zip
|
||||||
|
|
||||||
|
step-electron-chromedriver-build: &step-electron-chromedriver-build
|
||||||
|
run:
|
||||||
|
name: Build chromedriver.zip
|
||||||
|
command: |
|
||||||
|
cd src
|
||||||
|
ninja -C out/Default electron:electron_chromedriver_zip
|
||||||
|
|
||||||
|
step-electron-chromedriver-store: &step-electron-chromedriver-store
|
||||||
|
store_artifacts:
|
||||||
|
path: src/out/Default/chromedriver.zip
|
||||||
|
destination: chromedriver.zip
|
||||||
|
|
||||||
step-nodejs-headers-build: &step-nodejs-headers-build
|
step-nodejs-headers-build: &step-nodejs-headers-build
|
||||||
run:
|
run:
|
||||||
name: Build Node.js headers
|
name: Build Node.js headers
|
||||||
|
@ -272,6 +284,10 @@ steps-electron-build-for-tests: &steps-electron-build-for-tests
|
||||||
- *step-electron-dist-build
|
- *step-electron-dist-build
|
||||||
- *step-electron-dist-store
|
- *step-electron-dist-store
|
||||||
|
|
||||||
|
# chromedriver
|
||||||
|
- *step-electron-chromedriver-build
|
||||||
|
- *step-electron-chromedriver-store
|
||||||
|
|
||||||
# Node.js headers
|
# Node.js headers
|
||||||
- *step-nodejs-headers-build
|
- *step-nodejs-headers-build
|
||||||
|
|
||||||
|
@ -389,6 +405,10 @@ steps-build-mac: &steps-build-mac
|
||||||
- *step-electron-dist-build
|
- *step-electron-dist-build
|
||||||
- *step-electron-dist-store
|
- *step-electron-dist-store
|
||||||
|
|
||||||
|
# chromedriver
|
||||||
|
- *step-electron-chromedriver-build
|
||||||
|
- *step-electron-chromedriver-store
|
||||||
|
|
||||||
# ffmpeg
|
# ffmpeg
|
||||||
- *step-ffmpeg-gn-gen
|
- *step-ffmpeg-gn-gen
|
||||||
- *step-ffmpeg-build
|
- *step-ffmpeg-build
|
||||||
|
@ -399,8 +419,7 @@ steps-build-mac: &steps-build-mac
|
||||||
# It would be better to verify ffmpeg as a part of a test job,
|
# It would be better to verify ffmpeg as a part of a test job,
|
||||||
# but it requires `gn` to run, and it's complicated
|
# but it requires `gn` to run, and it's complicated
|
||||||
# to store all gn's dependencies and configs.
|
# to store all gn's dependencies and configs.
|
||||||
# FIXME(alexeykuzmin): Enable the next step back.
|
- *step-verify-ffmpeg
|
||||||
# - *step-verify-ffmpeg
|
|
||||||
|
|
||||||
# Node.js headers for tests
|
# Node.js headers for tests
|
||||||
- *step-nodejs-headers-build
|
- *step-nodejs-headers-build
|
||||||
|
|
15
BUILD.gn
15
BUILD.gn
|
@ -531,7 +531,7 @@ if (is_mac) {
|
||||||
mac_framework_bundle("electron_framework") {
|
mac_framework_bundle("electron_framework") {
|
||||||
output_name = electron_framework_name
|
output_name = electron_framework_name
|
||||||
framework_version = electron_framework_version
|
framework_version = electron_framework_version
|
||||||
framework_contents = [ "Resources" ]
|
framework_contents = [ "Resources", "Libraries" ]
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":electron_lib",
|
":electron_lib",
|
||||||
]
|
]
|
||||||
|
@ -705,7 +705,8 @@ if (is_mac) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_mac) {
|
if (!is_mac) {
|
||||||
data += [ "$root_out_dir/resources" ]
|
data += [ "$root_out_dir/resources/default_app.asar" ]
|
||||||
|
data += [ "$root_out_dir/resources/electron.asar" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
|
@ -915,6 +916,16 @@ dist_zip("electron_ffmpeg_zip") {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dist_zip("electron_chromedriver_zip") {
|
||||||
|
data_deps = [
|
||||||
|
"//chrome/test/chromedriver",
|
||||||
|
":licenses",
|
||||||
|
]
|
||||||
|
outputs = [
|
||||||
|
"$root_build_dir/chromedriver.zip",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
group("electron") {
|
group("electron") {
|
||||||
deps = [
|
deps = [
|
||||||
":electron_app",
|
":electron_app",
|
||||||
|
|
|
@ -29,7 +29,9 @@ build_script:
|
||||||
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%"
|
- 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 third_party/ffmpeg
|
||||||
- ninja -C out/Default electron:electron_dist_zip
|
- ninja -C out/Default electron:electron_dist_zip
|
||||||
|
- ninja -C out/Default electron:electron_chromedriver_zip
|
||||||
- appveyor PushArtifact out/Default/dist.zip
|
- appveyor PushArtifact out/Default/dist.zip
|
||||||
|
- appveyor PushArtifact out/Default/chromedriver.zip
|
||||||
test_script:
|
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 )
|
- 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: >-
|
- ps: >-
|
||||||
|
|
|
@ -7,7 +7,7 @@ static_library("brightray") {
|
||||||
"//components/network_session_configurator/common",
|
"//components/network_session_configurator/common",
|
||||||
"//components/prefs",
|
"//components/prefs",
|
||||||
"//content/public/browser",
|
"//content/public/browser",
|
||||||
"//content/shell:resources",
|
"//content/shell:copy_shell_resources",
|
||||||
"//net:extras",
|
"//net:extras",
|
||||||
"//net:net_with_v8",
|
"//net:net_with_v8",
|
||||||
"//skia",
|
"//skia",
|
||||||
|
|
19
build/zip.py
19
build/zip.py
|
@ -10,6 +10,23 @@ LINUX_BINARIES_TO_STRIP = [
|
||||||
'libnode.so'
|
'libnode.so'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
EXTENSIONS_TO_SKIP = [
|
||||||
|
'.pdb'
|
||||||
|
]
|
||||||
|
|
||||||
|
PATHS_TO_SKIP = [
|
||||||
|
'angledata', #Skipping because it is an output of //ui/gl that we don't need
|
||||||
|
'swiftshader', #Skipping because it is an output of //ui/gl that we don't need
|
||||||
|
]
|
||||||
|
|
||||||
|
def skip_path(dep):
|
||||||
|
should_skip = (
|
||||||
|
any(dep.startswith(path) for path in PATHS_TO_SKIP) or
|
||||||
|
any(dep.endswith(ext) for ext in EXTENSIONS_TO_SKIP))
|
||||||
|
if should_skip:
|
||||||
|
print("Skipping {}".format(dep))
|
||||||
|
return should_skip
|
||||||
|
|
||||||
def strip_binaries(target_cpu, dep):
|
def strip_binaries(target_cpu, dep):
|
||||||
for binary in LINUX_BINARIES_TO_STRIP:
|
for binary in LINUX_BINARIES_TO_STRIP:
|
||||||
if dep.endswith(binary):
|
if dep.endswith(binary):
|
||||||
|
@ -48,6 +65,8 @@ def main(argv):
|
||||||
for dep in dist_files:
|
for dep in dist_files:
|
||||||
if target_os == 'linux':
|
if target_os == 'linux':
|
||||||
strip_binaries(target_cpu, dep)
|
strip_binaries(target_cpu, dep)
|
||||||
|
if skip_path(dep):
|
||||||
|
continue
|
||||||
if os.path.isdir(dep):
|
if os.path.isdir(dep):
|
||||||
for root, dirs, files in os.walk(dep):
|
for root, dirs, files in os.walk(dep):
|
||||||
for file in files:
|
for file in files:
|
||||||
|
|
51
vsts.yml
51
vsts.yml
|
@ -1,6 +1,7 @@
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build_Electron_via_GN
|
- job: Build_Electron_via_GN
|
||||||
timeoutInMinutes: 180
|
displayName: Build Electron via GN
|
||||||
|
timeoutInMinutes: 120
|
||||||
steps:
|
steps:
|
||||||
- bash: |
|
- bash: |
|
||||||
export PATH="$PATH:/Users/electron/depot_tools"
|
export PATH="$PATH:/Users/electron/depot_tools"
|
||||||
|
@ -51,38 +52,74 @@ jobs:
|
||||||
ninja -C out/Default electron:electron_app
|
ninja -C out/Default electron:electron_app
|
||||||
displayName: Ninja build app
|
displayName: Ninja build app
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
cd src
|
||||||
|
ninja -C out/Default third_party/electron_node:headers
|
||||||
|
displayName: Build Node.js headers for testing
|
||||||
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
cd src
|
||||||
|
gn gen out/ffmpeg --args='import("//electron/build/args/ffmpeg.gn") cc_wrapper="'"$SCCACHE_PATH"'"'" $GN_EXTRA_ARGS"
|
||||||
|
ninja -C out/ffmpeg third_party/ffmpeg
|
||||||
|
displayName: Non proprietary ffmpeg build
|
||||||
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
"$SCCACHE_BINARY" --stop-server
|
"$SCCACHE_BINARY" --stop-server
|
||||||
displayName: Check sccache stats after build
|
displayName: Check sccache stats after build
|
||||||
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
if pgrep Electron; then
|
||||||
|
killall Electron
|
||||||
|
fi
|
||||||
|
displayName: Make sure Electron isn't running from previous tests
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
cd src
|
||||||
|
python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg
|
||||||
|
displayName: Verify non proprietary ffmpeg
|
||||||
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
|
||||||
|
timeoutInMinutes: 5
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
# Make sure there aren't any Electron processes left running from previous tests
|
|
||||||
killall Electron
|
|
||||||
ninja -C out/Default third_party/electron_node:headers
|
ninja -C out/Default third_party/electron_node:headers
|
||||||
export ELECTRON_OUT_DIR=Default
|
export ELECTRON_OUT_DIR=Default
|
||||||
(cd electron && npm run test -- --ci --enable-logging)
|
(cd electron && npm run test -- --ci --enable-logging)
|
||||||
displayName: Test
|
displayName: Run Electron test suite
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], '1'))
|
||||||
|
timeoutInMinutes: 10
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default electron:electron_dist_zip
|
ninja -C out/Default electron:electron_dist_zip
|
||||||
displayName: Build dist zip
|
displayName: Build dist zip
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
cd src
|
||||||
|
ninja -C out/Default electron:electron_chromedriver_zip
|
||||||
|
displayName: Build chromedriver and zip
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFiles: '*.xml'
|
testResultsFiles: '*.xml'
|
||||||
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
||||||
condition: and(always(), eq(variables['MOCHA_FILE'], 'junit/test-results.xml'), eq(variables['RUN_TESTS'], '1'))
|
condition: and(always(), eq(variables['MOCHA_FILE'], 'junit/test-results.xml'))
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Build Artifacts
|
displayName: Publish Build Artifacts (application zip)
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/dist.zip'
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/dist.zip'
|
||||||
ArtifactName: dist.zip
|
ArtifactName: Default
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Publish Build Artifacts (chromedriver.zip)
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/chromedriver.zip'
|
||||||
|
ArtifactName: Default
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue