Skip to content
Permalink
Browse files

build: enable gn check for //electron:electron_lib (#17100)

* build: enable gn check for //electron:electron_lib

* ci: add gn check step

* ci: set depot_tools path

* chrome_key_systems_provider.h nogncheck

* chore: fix gn check errors on windows

* chore: gn check //electron:electron_app
  • Loading branch information...
deepak1556 committed Mar 5, 2019
1 parent ed31cfe commit 793623767782f14beddf3da6d5a1fbe1bcd26953
@@ -231,6 +231,14 @@ step-gn-gen-default: &step-gn-gen-default
cd src
gn gen out/Default --args='import("'$GN_CONFIG'") cc_wrapper="'"$SCCACHE_PATH"'"'" $GN_EXTRA_ARGS"
step-gn-check: &step-gn-check
run:
name: GN check
command: |
cd src
gn check out/Default //electron:electron_lib
gn check out/Default //electron:electron_app
step-electron-build: &step-electron-build
run:
name: Electron build
@@ -568,6 +576,15 @@ steps-checkout: &steps-checkout
- depot_tools
- src

steps-electron-gn-check: &steps-electron-gn-check
steps:
- attach_workspace:
at: .
- *step-depot-tools-add-to-path
- *step-setup-env-for-build
- *step-gn-gen-default
- *step-gn-check

steps-electron-build: &steps-electron-build
steps:
- attach_workspace:
@@ -857,6 +874,13 @@ jobs:
<<: *env-enable-sccache
<<: *steps-electron-build

linux-x64-debug-gn-check:
<<: *machine-linux-medium
environment:
<<: *env-linux-medium
<<: *env-debug-build
<<: *steps-electron-gn-check

linux-x64-testing:
<<: *machine-linux-2xlarge
environment:
@@ -865,6 +889,13 @@ jobs:
<<: *env-enable-sccache
<<: *steps-electron-build-for-tests

linux-x64-testing-gn-check:
<<: *machine-linux-medium
environment:
<<: *env-linux-medium
<<: *env-testing-build
<<: *steps-electron-gn-check

linux-x64-chromedriver:
<<: *machine-linux-medium
environment:
@@ -1005,6 +1036,14 @@ jobs:
<<: *env-enable-sccache
<<: *steps-electron-build

linux-arm64-debug-gn-check:
<<: *machine-linux-medium
environment:
<<: *env-linux-medium
<<: *env-arm64
<<: *env-debug-build
<<: *steps-electron-gn-check

linux-arm64-testing:
<<: *machine-linux-2xlarge
environment:
@@ -1015,6 +1054,14 @@ jobs:
TRIGGER_ARM_TEST: true
<<: *steps-electron-build-for-tests

linux-arm64-testing-gn-check:
<<: *machine-linux-medium
environment:
<<: *env-linux-medium
<<: *env-arm64
<<: *env-testing-build
<<: *steps-electron-gn-check

linux-arm64-chromedriver:
<<: *machine-linux-medium
environment:
@@ -1062,6 +1109,20 @@ jobs:
<<: *env-enable-sccache
<<: *steps-electron-build-for-tests

osx-debug-gn-check:
<<: *machine-mac
environment:
<<: *env-machine-mac
<<: *env-debug-build
<<: *steps-electron-gn-check

osx-testing-gn-check:
<<: *machine-mac
environment:
<<: *env-machine-mac
<<: *env-testing-build
<<: *steps-electron-gn-check

osx-chromedriver:
<<: *machine-mac
environment:
@@ -1096,6 +1157,22 @@ jobs:
<<: *env-enable-sccache
<<: *steps-electron-build-for-tests

mas-debug-gn-check:
<<: *machine-mac
environment:
<<: *env-machine-mac
<<: *env-mas
<<: *env-debug-build
<<: *steps-electron-gn-check

mas-testing-gn-check:
<<: *machine-mac
environment:
<<: *env-machine-mac
<<: *env-mas
<<: *env-testing-build
<<: *steps-electron-gn-check

mas-chromedriver:
<<: *machine-mac
environment:
@@ -1353,9 +1430,15 @@ workflows:
- linux-x64-debug:
requires:
- linux-checkout
- linux-x64-debug-gn-check:
requires:
- linux-checkout
- linux-x64-testing:
requires:
- linux-checkout
- linux-x64-testing-gn-check:
requires:
- linux-checkout
- linux-x64-testing-tests:
requires:
- linux-x64-testing
@@ -1380,9 +1463,15 @@ workflows:
- linux-arm64-debug:
requires:
- linux-checkout
- linux-arm64-debug-gn-check:
requires:
- linux-checkout
- linux-arm64-testing:
requires:
- linux-checkout
- linux-arm64-testing-gn-check:
requires:
- linux-checkout

build-mac:
jobs:
@@ -1391,6 +1480,13 @@ workflows:
requires:
- mac-checkout

- osx-debug-gn-check:
requires:
- mac-checkout
- osx-testing-gn-check:
requires:
- mac-checkout

- osx-testing-tests:
requires:
- osx-testing
@@ -1399,6 +1495,13 @@ workflows:
requires:
- mac-checkout

- mas-debug-gn-check:
requires:
- mac-checkout
- mas-testing-gn-check:
requires:
- mac-checkout

- mas-testing-tests:
requires:
- mas-testing
@@ -326,13 +326,13 @@ static_library("electron_lib") {

deps = [
":atom_js2c",
":resources",
"buildflags",
"chromium_src:chrome",
"manifests",
"native_mate",
"//base",
"//base:base_static",
"//base:i18n",
"//base/allocator:buildflags",
"//chrome/app/resources:platform_locale_settings",
"//components/certificate_transparency",
"//components/net_log",
@@ -341,10 +341,12 @@ static_library("electron_lib") {
"//components/spellcheck/renderer",
"//components/viz/host",
"//components/viz/service",
"//content/public/app:both",
"//content/public/browser",
"//content/public/child",
"//content/public/common:service_names",
"//content/public/renderer",
"//content/public/utility",
"//device/bluetooth",
"//gin",
"//media/capture/mojom:video_capture",
"//media/mojo/interfaces",
@@ -354,6 +356,7 @@ static_library("electron_lib") {
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/shared_impl",
"//printing/buildflags",
"//services/audio/public/mojom:constants",
"//services/device/public/mojom",
"//services/proxy_resolver:lib",
@@ -369,8 +372,17 @@ static_library("electron_lib") {
"//third_party/widevine/cdm:headers",
"//ui/events:dom_keycode_converter",
"//ui/gl",
"//ui/native_theme",
"//ui/shell_dialogs",
"//ui/views",
"//v8",
"//v8:v8_libplatform",
]

public_deps = [
"//base",
"//base:i18n",
"//content/public/app:both",
]

include_dirs = [
@@ -435,6 +447,7 @@ static_library("electron_lib") {
"atom/browser/fake_location_provider.cc",
"atom/browser/fake_location_provider.h",
]
deps += [ "//services/device/public/cpp/geolocation" ]
}

if (is_mac) {
@@ -485,9 +498,6 @@ static_library("electron_lib") {
"//device/bluetooth",
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/native_theme",
"//ui/views/controls/webview",
"//ui/wm",
]
configs += [ ":gio_unix" ]
defines += [
@@ -499,9 +509,20 @@ static_library("electron_lib") {
}
if (is_win) {
libs += [ "dwmapi.lib" ]
deps += [
"//third_party/breakpad:breakpad_handler",
"//third_party/breakpad:breakpad_sender",
"//ui/native_theme:native_theme_browser",
"//ui/wm/public",
]
public_deps += [ "//sandbox/win:sandbox" ]
}
if (is_linux || is_win) {
deps += [ "//third_party/breakpad:client" ]
deps += [
"//third_party/breakpad:client",
"//ui/views/controls/webview",
"//ui/wm",
]
include_dirs += [ "//third_party/breakpad" ]
}

@@ -866,6 +887,7 @@ if (is_mac) {
":electron_lib",
":packed_resources",
"//content:sandbox_helper_win",
"//electron/buildflags",
"//ui/strings",
]

@@ -894,17 +916,7 @@ if (is_mac) {
# TODO: we should be generating our .rc files more like how chrome does
"atom/browser/resources/win/atom.ico",
"atom/browser/resources/win/atom.rc",
"atom/browser/resources/win/resources.h",
]

deps += [
"//third_party/breakpad:breakpad_handler",
"//third_party/breakpad:breakpad_sender",
"//ui/native_theme:native_theme_browser",
"//ui/shell_dialogs",
"//ui/views/controls/webview",
"//ui/wm",
"//ui/wm/public",
"atom/browser/resources/win/resource.h",
]

libs = [
@@ -56,6 +56,8 @@ build_script:
- cd src
- ps: $env:BUILD_CONFIG_PATH="//electron/build/args/%GN_CONFIG%.gn"
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") %GN_EXTRA_ARGS%"
- gn check out/Default //electron:electron_lib
- gn check out/Default //electron:electron_app
- 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 electron:electron_ffmpeg_zip
@@ -34,8 +34,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/common/chrome_paths.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/compositor_util.h" // nogncheck
#include "content/browser/gpu/gpu_data_manager_impl.h" // nogncheck
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/child_process_data.h"
@@ -17,8 +17,8 @@
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/options_switches.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h"
#include "content/browser/renderer_host/render_widget_host_impl.h" // nogncheck
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "gin/converter.h"
@@ -49,7 +49,7 @@
#include "native_mate/object_template_builder.h"
#include "net/base/load_flags.h"
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_cache.h"
#include "net/dns/host_cache.h" // nogncheck
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_auth_preferences.h"
#include "net/http/http_cache.h"
@@ -54,10 +54,10 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/ssl/security_state_tab_helper.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/render_frame_host_manager.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/frame_host/frame_tree_node.h" // nogncheck
#include "content/browser/frame_host/render_frame_host_manager.h" // nogncheck
#include "content/browser/renderer_host/render_widget_host_impl.h" // nogncheck
#include "content/browser/renderer_host/render_widget_host_view_base.h" // nogncheck
#include "content/common/widget_messages.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/download_request_utils.h"
@@ -4,9 +4,9 @@

#include "atom/browser/api/atom_api_web_contents.h"

#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/browser/frame_host/frame_tree.h" // nogncheck
#include "content/browser/frame_host/frame_tree_node.h" // nogncheck
#include "content/browser/web_contents/web_contents_impl.h" // nogncheck
#include "content/public/browser/guest_mode.h"

#if BUILDFLAG(ENABLE_OSR)
@@ -11,7 +11,7 @@

#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/promise_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_data_manager_impl.h" // nogncheck
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/gpu_data_manager_observer.h"

Oops, something went wrong.

0 comments on commit 7936237

Please sign in to comment.
You can’t perform that action at this time.