Skip to content

Commit 093b5d1

Browse files
committed
Add AppVeyor fast-fail snippet
to slightly mitigate #3
1 parent 7590d62 commit 093b5d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

appveyor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ notifications:
2020
on_build_status_changed: false
2121

2222
install:
23+
# If there's a newer build queued for the same PR, cancel this one
24+
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
25+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
26+
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
27+
throw "There are newer queued builds for this pull request, failing early." }
2328
# Download most recent Julia Windows binary
2429
- ps: (new-object net.webclient).DownloadFile(
2530
$("http://s3.amazonaws.com/"+$env:JULIAVERSION),

0 commit comments

Comments
 (0)