Skip to content

Commit 3110a72

Browse files
committed
BLD: add in build conflict resolution to appeveyor.yml
1 parent f7506c6 commit 3110a72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

appveyor.yml

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ init:
4949
- "ECHO %PYTHON_VERSION% %PYTHON%"
5050

5151
install:
52+
# cancel older builds for the same PR
53+
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
54+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
55+
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
56+
throw "There are newer queued builds for this pull request, failing early." }
57+
5258
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit)
5359
# updates conda & installs: conda-build jinja2 anaconda-client
5460
- powershell .\ci\install.ps1
@@ -69,6 +75,7 @@ install:
6975
# https://github.com/conda/conda-build/issues/1001
7076
# disabling 3.4 as windows complains upon compiling byte
7177
# code
78+
7279
- cmd: conda install conda-build=1.21.7
7380
- cmd: conda config --set ssl_verify false
7481

0 commit comments

Comments
 (0)