mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 17:47:56 +08:00
BLD: Cancel previously queued appveyor builds for a PR
This commit is contained in:
@@ -77,6 +77,16 @@ init:
|
||||
- "ECHO %NUMPY_VERSION%"
|
||||
|
||||
install:
|
||||
# If there is a newer build queued for the same PR, cancel this one.
|
||||
# The AppVeyor 'rollout builds' option is supposed to serve the same
|
||||
# purpose but it is problematic because it tends to cancel builds pushed
|
||||
# directly to master instead of just PR builds (or the converse).
|
||||
# credits: JuliaLang developers.
|
||||
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
||||
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
||||
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
||||
throw "There are newer queued builds for this pull request, failing early." }
|
||||
|
||||
# Get cygwin's git out of our PATH. See https://github.com/omnia-md/conda-dev-recipes/pull/16/files#diff-180360612c6b8c4ed830919bbb4dd459
|
||||
- "del C:\\cygwin\\bin\\git.exe"
|
||||
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit),
|
||||
|
||||
Reference in New Issue
Block a user