From e78d84165a39c3fc22608f8b900a131307afbf37 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 18 Sep 2018 09:48:01 -0400 Subject: [PATCH] Add chromedriver to build Make sure certain paths/files don't make it into the dist zip Don't build the content shell test_runner Make sure libffmpeg.dylib gets put in the right place Run verify-ffmpeg on Mac builds Add ffmpeg build to VSTS --- BUILD.gn | 13 +++++-------- brightray/BUILD.gn | 2 +- build/zip.py | 23 +++++++++++++++++++++++ vsts.yml | 7 +++++++ 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index ada0cfbc9e..a102e522d8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -222,6 +222,7 @@ static_library("electron_lib") { "//base", "//base:i18n", "//chrome/common:constants", + "//chrome/test/chromedriver", "//components/network_session_configurator/common", "//components/prefs", "//components/printing/common", @@ -497,14 +498,10 @@ if (is_mac) { ] } - if (!is_component_build) { + if (is_component_ffmpeg) { bundle_data("electron_framework_libraries") { - sources = [] - public_deps = [] - if (is_component_ffmpeg) { - sources += [ "$root_out_dir/libffmpeg.dylib" ] - public_deps += [ "//third_party/ffmpeg:ffmpeg" ] - } + sources = [ "$root_out_dir/libffmpeg.dylib" ] + public_deps = [ "//third_party/ffmpeg:ffmpeg" ] outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", ] @@ -531,7 +528,7 @@ if (is_mac) { mac_framework_bundle("electron_framework") { output_name = electron_framework_name framework_version = electron_framework_version - framework_contents = [ "Resources" ] + framework_contents = [ "Resources", "Libraries" ] public_deps = [ ":electron_lib", ] diff --git a/brightray/BUILD.gn b/brightray/BUILD.gn index c83a61231e..2441ba8052 100644 --- a/brightray/BUILD.gn +++ b/brightray/BUILD.gn @@ -7,7 +7,7 @@ static_library("brightray") { "//components/network_session_configurator/common", "//components/prefs", "//content/public/browser", - "//content/shell:resources", + "//content/shell:copy_shell_resources", "//net:extras", "//net:net_with_v8", "//skia", diff --git a/build/zip.py b/build/zip.py index 150656e2c2..80bf696db0 100644 --- a/build/zip.py +++ b/build/zip.py @@ -10,6 +10,27 @@ LINUX_BINARIES_TO_STRIP = [ 'libnode.so' ] +EXTENSIONS_TO_SKIP = [ + '.pdb' +] + +PATHS_TO_SKIP = [ + 'angledata', + 'swiftshader', + 'resources/inspector' +] + +def skip_path(dep): + should_skip = False + for path in PATHS_TO_SKIP: + if dep.startswith(path): + print 'Skipping: '+dep + should_skip = True + for extension in EXTENSIONS_TO_SKIP: + if dep.endswith(extension): + print 'Skipping: '+dep + should_skip = True + def strip_binaries(target_cpu, dep): for binary in LINUX_BINARIES_TO_STRIP: if dep.endswith(binary): @@ -48,6 +69,8 @@ def main(argv): for dep in dist_files: if target_os == 'linux': strip_binaries(target_cpu, dep) + if skip_path(dep): + continue if os.path.isdir(dep): for root, dirs, files in os.walk(dep): for file in files: diff --git a/vsts.yml b/vsts.yml index 6c4e7fdf00..6f16bf2b9b 100644 --- a/vsts.yml +++ b/vsts.yml @@ -51,6 +51,13 @@ jobs: ninja -C out/Default electron:electron_app displayName: Ninja build app + - 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: | "$SCCACHE_BINARY" --stop-server displayName: Check sccache stats after build