@@ -5,13 +5,14 @@ group: beta
5
5
6
6
# To cache doc-building dependencies and C compiler output.
7
7
cache :
8
- - pip
9
- - ccache
8
+ - pip
9
+ - ccache
10
10
11
11
branches :
12
12
only :
13
13
- master
14
14
- /^\d\.\d$/
15
+ - buildbot-custom
15
16
16
17
matrix :
17
18
fast_finish : true
@@ -37,28 +38,53 @@ matrix:
37
38
script :
38
39
- make check suspicious html SPHINXOPTS="-q -W -j4"
39
40
40
- # Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
41
- before_script :
41
+
42
+ before_install :
43
+ - set -e
42
44
- |
43
- set -e
44
- if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)'
45
+ # Check short-circuit conditions
46
+ if [ "${TESTING}" != "docs" ]
45
47
then
46
- echo "Only docs were updated, stopping build process."
47
- exit
48
+ if [ "$TRAVIS_PULL_REQUEST" = "false" ]
49
+ then
50
+ echo "Not a PR, doing full build."
51
+ else
52
+ # Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE
53
+ # may include more changes than desired if the history is convoluted.
54
+ # Instead, explicitly fetch the base branch and compare against the
55
+ # merge-base commit.
56
+ git fetch -q origin +refs/heads/$TRAVIS_BRANCH
57
+ changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD))
58
+ echo "Files changed:"
59
+ echo "$changes"
60
+ if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
61
+ then
62
+ echo "Only docs were updated, stopping build process."
63
+ exit
64
+ fi
65
+ fi
48
66
fi
49
- ./configure --with-pydebug
50
- make -j4
51
- make -j4 regen-all
52
- changes=`git status --porcelain`
67
+
68
+
69
+ # Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
70
+ before_script :
71
+ - ./configure --with-pydebug
72
+ - make -j4 regen-all
73
+ - changes=`git status --porcelain`
74
+ - |
75
+ # Check for changes in regenerated files
53
76
if ! test -z "$changes"
54
77
then
55
78
echo "Generated files not up to date"
56
79
echo "$changes"
57
80
exit 1
58
81
fi
59
- make pythoninfo
82
+ - make -j4
83
+ - make pythoninfo
60
84
61
85
script :
86
+ # Check that all symbols exported by libpython start with "Py" or "_Py"
87
+ - make smelly
62
88
# `-r -w` implicitly provided through `make buildbottest`.
63
89
- make buildbottest TESTOPTS="-j4 -uall,-cpu"
64
90
0 commit comments