Skip to content

Commit cbc077a

Browse files
thomasjpfanjnothman
authored andcommitted
BLD Appveyor checks for newer build after pip install (scikit-learn#13226)
1 parent ab2f539 commit cbc077a

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
@@ -64,6 +64,13 @@ install:
6464
# Install the generated wheel package to test it
6565
- "pip install --pre --no-index --find-links dist/ scikit-learn"
6666

67+
# If there is a newer build queued for the same PR, cancel this one.
68+
# credits: JuliaLang developers.
69+
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
70+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=500).builds | `
71+
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
72+
throw "There are newer queued builds for this pull request, failing early." }
73+
6774
# Not a .NET project, we build scikit-learn in the install step instead
6875
build: false
6976

0 commit comments

Comments
 (0)