summaryrefslogtreecommitdiffstats
path: root/.vsts/windows-pr.yml
diff options
context:
space:
mode:
Diffstat (limited to '.vsts/windows-pr.yml')
-rw-r--r--.vsts/windows-pr.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/.vsts/windows-pr.yml b/.vsts/windows-pr.yml
index 5ec4522..3dd5609 100644
--- a/.vsts/windows-pr.yml
+++ b/.vsts/windows-pr.yml
@@ -37,13 +37,25 @@ steps:
clean: true
fetchDepth: 5
+- powershell: |
+ git fetch -q origin $(System.PullRequest.TargetBranch)
+ if (-not (git diff --name-only HEAD (git merge-base HEAD FETCH_HEAD) | sls -NotMatch '(\.rst$)|(^Doc)|(^Misc)')) {
+ Write-Host 'Only docs were updated. Skipping build'
+ Write-Host '##vso[task.setvariable variable=DocOnly]true'
+ }
+ displayName: Detect doc-only changes
+ condition: and(succeeded(), variables['System.PullRequest.TargetBranch'])
+
- script: PCbuild\build.bat -e $(buildOpt)
displayName: 'Build CPython'
+ condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
- script: python.bat -m test.pythoninfo
displayName: 'Display build info'
+ condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
- script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
displayName: 'Tests'
env:
PREFIX: $(Py_OutDir)\$(outDirSuffix)
+ condition: and(succeeded(), ne(variables['DocOnly'], 'true'))