Skip to content

Commit

Permalink
build: speed up windows source retrieval (#20955)
Browse files Browse the repository at this point in the history
* ci: speed up src retrieval

* Don't save zip on ia32

* Update external binaries if src zip already exists

* Apply suggestions from code review

Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>

* Update appveyor.yml
  • Loading branch information
John Kleinschmidt committed Nov 5, 2019
1 parent ac69b89 commit f18fca0
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,30 @@ build_script:
--unmanaged
%GCLIENT_EXTRA_ARGS%
"https://github.com/electron/electron"
- gclient sync --with_branch_heads --with_tags --reset
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
gclient sync --with_branch_heads --with_tags --reset
} else {
cd src\electron
node script\generate-deps-hash.js
$depshash = Get-Content .\.depshash -Raw
$zipfile = "Z:\$depshash.7z"
cd ..\..
if (Test-Path -Path $zipfile) {
# file exists, unzip and then gclient sync
7z x -y $zipfile -mmt=30 -aoa
# update external binaries
python src/electron/script/update-external-binaries.py
} else {
# file does not exist, gclient sync, then zip
gclient sync --with_branch_heads --with_tags --reset
if ($env:TARGET_ARCH -ne 'ia32') {
# archive current source for future use
# only run on x64/woa to avoid contention saving
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
}
}
}
- 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%\""
Expand Down

0 comments on commit f18fca0

Please sign in to comment.