Browse Source

ci: don't run gn debug build on older branches (#14584)

* ci: don't run gn debug build on older branches

Older branches that build using gyp do not run both a debug and testing build.

* Actually skip the build if debug

(cherry picked from commit f924a1605569d81d38026fdf434e9af59543f56c)
(cherry picked from commit 5f3bedd1e0aed868d4634dd31bdb8b543f7802d8)
John Kleinschmidt 6 years ago
parent
commit
54854f36c3
1 changed files with 4 additions and 2 deletions
  1. 4 2
      appveyor.yml

+ 4 - 2
appveyor.yml

@@ -2,7 +2,9 @@ build_cloud: electron-16
 image: electron-16-vs2015
 build_script:
 - ps: >-
-    if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
+    if($env:SKIP_GYP_BUILD -eq "true") {
+      Write-warning "Skipping debug build for older branch"; Exit-AppveyorBuild
+    } elseif(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
       Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
     } else {
       Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64"
@@ -55,4 +57,4 @@ artifacts:
 - path: test-results.xml
   name: test-results.xml
 deploy_script:
-- ps: "if (Test-Path Env:\\ELECTRON_RELEASE) {\n  if (Test-Path Env:\\RUN_RELEASE_BUILD) {\n    Write-Output \"Uploading Electron release distribution to s3\"\n    & python script\\upload.py --upload_to_s3\n  } else {\n    Write-Output \"Uploading Electron release distribution to github releases\"\n    & python script\\upload.py\n  }\n} else {\n  Write-Output \"Skipping upload distribution because build is not for release\"\n}"
+- ps: "if (Test-Path Env:\\ELECTRON_RELEASE) {\n  if (Test-Path Env:\\RUN_RELEASE_BUILD) {\n    Write-Output \"Uploading Electron release distribution to s3\"\n    & python script\\upload.py --upload_to_s3\n  } else {\n    Write-Output \"Uploading Electron release distribution to github releases\"\n    & python script\\upload.py\n  }\n} else {\n  Write-Output \"Skipping upload distribution because build is not for release\"\n}"