build: speed up windows source retrieval (#20955)
* 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
This commit is contained in:
parent
ac69b89e82
commit
f18fca0729
1 changed files with 24 additions and 1 deletions
25
appveyor.yml
25
appveyor.yml
|
@ -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%\""
|
||||
|
|
Loading…
Reference in a new issue