From: Zachary Ware Date: Sun, 11 Feb 2018 19:57:11 +0000 (-0600) Subject: [2.7] Add short-circuit for doc changes to AppVeyor (GH-5629) X-Git-Tag: v2.7.15rc1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=239e13b3b8af05fe860427c62982f390613086d5;p=thirdparty%2FPython%2Fcpython.git [2.7] Add short-circuit for doc changes to AppVeyor (GH-5629) (cherry picked from commit 28607e0dd9417ce44a109980ffd60697c1afdea0) --- diff --git a/.github/appveyor.yml b/.github/appveyor.yml index ddd5b15c5aa8..fa614dbf9b87 100644 --- a/.github/appveyor.yml +++ b/.github/appveyor.yml @@ -7,10 +7,26 @@ branches: - buildbot-custom cache: - externals -> PCbuild\* +before_build: + - ps: |+ + if ($env:APPVEYOR_RE_BUILD) { + echo 'Doing full build due to re-build request.' + } elseif (!$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) { + echo 'Not a PR, doing full build.' + } else { + $mergebase = git merge-base $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT $env:APPVEYOR_REPO_BRANCH + $changes = git diff --name-only HEAD $mergebase | grep -vE '(\.rst$)|(^Doc)|(^Misc)' + If (!$changes) { + echo 'Only docs were updated, stopping build process.' + Exit-AppveyorBuild + } + } + + build_script: -- cmd: PCbuild\build.bat -e -- cmd: PCbuild\python.exe -m test.pythoninfo + - cmd: PCbuild\build.bat -e + - cmd: PCbuild\python.exe -m test.pythoninfo test_script: -- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest -j2 + - cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest -j2 environment: HOST_PYTHON: C:\Python36\python.exe