|
@@ -77,15 +77,39 @@ build_script:
|
|
|
%GCLIENT_EXTRA_ARGS%
|
|
|
"https://github.com/electron/electron"
|
|
|
- gclient sync --with_branch_heads --with_tags --ignore_locks --break_repo_locks
|
|
|
+ - ps: >-
|
|
|
+ if ($env:SAVE_GCLIENT_SRC -eq 'true') {
|
|
|
+ # archive current source for future use
|
|
|
+ # only run on x64/woa to avoid contention saving
|
|
|
+ if ($(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30;$LASTEXITCODE -ne 0)) {
|
|
|
+ Write-warning "Could not save source to shared drive; continuing anyway"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ - ps: >-
|
|
|
+ if ($env:GN_CONFIG -ne 'release') {
|
|
|
+ if (Test-Path 'env:RAW_GOMA_AUTH') {
|
|
|
+ $env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
|
|
|
+ $env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
|
|
|
+ }
|
|
|
+ git clone https://github.com/electron/build-tools.git
|
|
|
+ cd build-tools
|
|
|
+ npm install
|
|
|
+ mkdir third_party
|
|
|
+ node -e "require('./src/utils/goma.js').downloadAndPrepare()"
|
|
|
+ $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
|
|
|
+ $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
|
|
|
+ cd ..
|
|
|
+ .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
|
|
|
+ }
|
|
|
- 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% cc_wrapper=\"%SCCACHE_PATH%\""
|
|
|
+ - set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
|
|
+ - if DEFINED GN_GOMA_FILE (gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% ") else (gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") %GN_EXTRA_ARGS% cc_wrapper=\"%SCCACHE_PATH%\"")
|
|
|
- gn check out/Default //electron:electron_lib
|
|
|
- gn check out/Default //electron:electron_app
|
|
|
- gn check out/Default //electron:manifests
|
|
|
- gn check out/Default //electron/shell/common/api:mojo
|
|
|
- - ninja -C out/Default electron:electron_app
|
|
|
- - if "%GN_CONFIG%"=="testing" ( python C:\Users\electron\depot_tools\post_build_ninja_summary.py -C out\Default )
|
|
|
+ - if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app)
|
|
|
+ - if "%GN_CONFIG%"=="testing" ( python C:\Users\electron\depot_tools\post_build_ninja_summary.py -C out\Default )
|
|
|
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%"
|
|
|
- ninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
|
|
- ninja -C out/Default electron:electron_dist_zip
|
|
@@ -94,7 +118,7 @@ build_script:
|
|
|
- ninja -C out/Default electron:hunspell_dictionaries_zip
|
|
|
- ninja -C out/Default electron:electron_chromedriver_zip
|
|
|
- ninja -C out/Default third_party/electron_node:headers
|
|
|
- - cmd /C %SCCACHE_PATH% --show-stats
|
|
|
+ - if "%GN_CONFIG%"=="testing" ( python %LOCAL_GOMA_DIR%\goma_ctl.py stat )
|
|
|
- appveyor PushArtifact out/Default/dist.zip
|
|
|
- appveyor PushArtifact out/Default/shell_browser_ui_unittests.exe
|
|
|
- appveyor PushArtifact out/Default/chromedriver.zip
|