diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 3d4f5c16264..a6c0411fcab 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -328,6 +328,10 @@ step-setup-goma-for-build: &step-setup-goma-for-build node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" export GOMA_FALLBACK_ON_AUTH_FAILURE=true third_party/goma/goma_ctl.py ensure_start + if [ ! -z "$RAW_GOMA_AUTH" ] && [ "`third_party/goma/goma_auth.py info`" != "Login as Fermi Planck" ]; then + echo "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token." + exit 1 + fi echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV diff --git a/appveyor.yml b/appveyor.yml index fab35e3bc66..7b413faee5c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,6 +67,31 @@ build_script: - mkdir src - update_depot_tools.bat - ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron + - ps: >- + 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 + - ps: >- + node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" + - 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 + - ps: >- + if (Test-Path 'env:RAW_GOMA_AUTH') { + $goma_login = python $env:LOCAL_GOMA_DIR\goma_auth.py info + if ($goma_login -eq 'Login as Fermi Planck') { + Write-warning "Goma authentication is correct"; + } else { + Write-warning "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token."; + $host.SetShouldExit(1) + } + } - ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools" - ps: >- if ($env:GN_CONFIG -ne 'release') { @@ -130,21 +155,6 @@ build_script: Write-warning "Failed to add third_party\angle\.git; continuing anyway" } } - - ps: >- - 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 - - ps: >- - node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" - - 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 - gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "