From c856b5fa53867f9e6672df5364f91dec067c6ee6 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 3 Nov 2020 19:18:55 -0500 Subject: [PATCH] build: use goma for Windows releases (#26324) --- appveyor.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 75dadf178857..7fff32319f23 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,7 +66,6 @@ build_script: - update_depot_tools.bat - ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron - ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools" - - ps: $env:SCCACHE_PATH="$pwd\src\electron\external_binaries\sccache.exe" - ps: >- if ($env:GN_CONFIG -eq 'release') { $env:GCLIENT_EXTRA_ARGS="$env:GCLIENT_EXTRA_ARGS --custom-var=checkout_requests=True" @@ -134,24 +133,22 @@ build_script: } } - 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 + 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()" + - ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)" + - ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)" + - cd .. + - ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR - cd src - 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 gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% " - gn check out/Default //electron:electron_lib - gn check out/Default //electron:electron_app - gn check out/Default //electron:manifests @@ -170,7 +167,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 - - if "%GN_CONFIG%"=="testing" ( python %LOCAL_GOMA_DIR%\goma_ctl.py stat ) + - python %LOCAL_GOMA_DIR%\goma_ctl.py stat - python electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json - appveyor PushArtifact out/Default/windows_toolchain_profile.json - appveyor PushArtifact out/Default/dist.zip