diff options
author | Carlos O'Ryan <coryan@users.noreply.github.com> | 2018-01-04 13:04:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 13:04:31 -0500 |
commit | 9cee677ce40d2412afcb9aa43244ccbe68b772a5 (patch) | |
tree | 4b8a61185320cc272b893d85a51aef4d65a19af1 /appveyor.yml | |
parent | a5014476f0c49c966e4ac602469cddefc7ed486d (diff) | |
download | googletest-9cee677ce40d2412afcb9aa43244ccbe68b772a5.tar.gz googletest-9cee677ce40d2412afcb9aa43244ccbe68b772a5.tar.bz2 googletest-9cee677ce40d2412afcb9aa43244ccbe68b772a5.zip |
Optimize build matrix (#1)
Disable expensive builds on pull requests.
Diffstat (limited to 'appveyor.yml')
-rw-r--r-- | appveyor.yml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/appveyor.yml b/appveyor.yml index 4e8d6f6e..804e3ec7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,7 @@ environment: - compiler: msvc-15-seh generator: "Visual Studio 15 2017 Win64" APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + enabled_on_pr: yes - compiler: msvc-14-seh generator: "Visual Studio 14 2015" @@ -43,7 +44,6 @@ environment: configuration: - Debug - #- Release build: verbosity: minimal @@ -52,6 +52,16 @@ install: - ps: | Write-Output "Compiler: $env:compiler" Write-Output "Generator: $env:generator" + Write-Output "Pull Request: <$env:APPVEYOR_PULL_REQUEST_NUMBER>" + Write-Output "Enabled on PR: <$env:enabled_on_pr>" + if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER)) { + Write-Output "This is a pull request build" + if (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes") { + Write-Output "PR builds are *NOT* explicitly enabled" + } + } else { + Write-Output "This is *NOT* a pull request build" + } # git bash conflicts with MinGW makefiles if ($env:generator -eq "MinGW Makefiles") { @@ -63,6 +73,10 @@ install: build_script: - ps: | + # Only enable some builds for pull requests, the AppVeyor queue is too long. + if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "")) { + return + } md _build -Force | Out-Null cd _build @@ -81,6 +95,10 @@ build_script: test_script: - ps: | + # Only enable some builds for pull requests, the AppVeyor queue is too long. + if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "")) { + return + } if ($env:generator -eq "MinGW Makefiles") { return # No test available for MinGW } |