Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 239e13b

Browse files
authored
[2.7] Add short-circuit for doc changes to AppVeyor (pythonGH-5629)
(cherry picked from commit 28607e0)
1 parent ea6e644 commit 239e13b

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/appveyor.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,26 @@ branches:
77
- buildbot-custom
88
cache:
99
- externals -> PCbuild\*
10+
before_build:
11+
- ps: |+
12+
if ($env:APPVEYOR_RE_BUILD) {
13+
echo 'Doing full build due to re-build request.'
14+
} elseif (!$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
15+
echo 'Not a PR, doing full build.'
16+
} else {
17+
$mergebase = git merge-base $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT $env:APPVEYOR_REPO_BRANCH
18+
$changes = git diff --name-only HEAD $mergebase | grep -vE '(\.rst$)|(^Doc)|(^Misc)'
19+
If (!$changes) {
20+
echo 'Only docs were updated, stopping build process.'
21+
Exit-AppveyorBuild
22+
}
23+
}
24+
25+
1026
build_script:
11-
- cmd: PCbuild\build.bat -e
12-
- cmd: PCbuild\python.exe -m test.pythoninfo
27+
- cmd: PCbuild\build.bat -e
28+
- cmd: PCbuild\python.exe -m test.pythoninfo
1329
test_script:
14-
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest -j2
30+
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest -j2
1531
environment:
1632
HOST_PYTHON: C:\Python36\python.exe

0 commit comments

Comments
 (0)