-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
102 lines (95 loc) · 4.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
language: python
matrix:
include:
- dist: precise
python: "2.6" # looks bad when lxml-4.0.0 no longer on PyPI
env: MAINT_EXTRA=0
# cf. https://github.com/travis-ci/travis-ci/issues/2219
- python: "2.7_with_system_site_packages"
env: MAINT_EXTRA=0
- python: "2.7_with_system_site_packages"
env: MAINT_EXTRA=1
- dist: trusty
python: "3.2" # looks bad when lxml-4.0.0 no longer on PyPI
env: MAINT_EXTRA=0
- dist: trusty
python: "3.4"
env: MAINT_EXTRA=0
- dist: bionic
python: "3.6_with_system_site_packages"
env: MAINT_EXTRA=0
- dist: bionic
python: "3.7"
env: MAINT_EXTRA=0
- dist: bionic
python: "3.8-dev"
env: MAINT_EXTRA=0
- python: "3.9-dev"
env: MAINT_EXTRA=0
before_install:
# http://docs.travis-ci.com/user/installing-dependencies/#Installing-Ubuntu-packages
# https://github.com/travis-ci/travis-ci/issues/2124#issuecomment-38992012
- sudo apt-get update -qq
# speed the run up
- test $MAINT_EXTRA -ne 0
|| python -c
'from sys import exit, version_info as v; exit(v[:2] in ((2, 7), (3, 6)))'
|| sudo apt-get install -qq $(python -c
'from sys import exit, version_info as v; exit(v[1] == 2)'
&& echo "python-lxml python-setuptools"
|| echo "python3-lxml python3-setuptools")
- test $MAINT_EXTRA -eq 0 || sudo apt-get install -qq libxml2-utils
install:
- pushd __root__
- test $MAINT_EXTRA -ne 0
|| python setup.py -q saveopts -f setup.cfg pkg_prepare
--ra-metadata-dir="$(pwd)/cluster"
--ccs-flatten="$(dirname $(pwd))/ccs_flatten"
--editor="sed -i 's|\(force-block=\"\)false|\1true|;w /dev/stdout'"
#- cat setup.cfg
# make following robust enough to deal with pip pre-6.0(?)
- test $MAINT_EXTRA -ne 0
|| { _pip() { _log="$(pip "$@")"; _ret=$?;
echo "$_log" | grep -Fi -eCOLLECTED -eINSTALLED -eERROR;
return $_ret; };
{ _pip install --disable-pip-version-check -- pip
&& { { test "$TRAVIS_PYTHON_VERSION" != 2.6
&& test "$TRAVIS_PYTHON_VERSION" != 3.2
&& test "$TRAVIS_PYTHON_VERSION" != 3.4; }
|| _pip install --disable-pip-version-check "lxml <= 4.0"; }
&& _pip install --disable-pip-version-check -e .[test,coverage]
&& _pip install --disable-pip-version-check coveralls; }
|| { _pip install --disable-pip-version-check -- pip 2>/dev/null
|| { { { test "$TRAVIS_PYTHON_VERSION" != 2.6
&& test "$TRAVIS_PYTHON_VERSION" != 3.2
&& test "$TRAVIS_PYTHON_VERSION" != 3.4; }
|| _pip install "lxml <= 4.0"; }
&& _pip install -e .[test,coverage]
&& _pip install coveralls; }; }
|| { ret=$?; echo "LOGS>";
cat ~/.pip/pip.log ~/.cache/pip/log/debug.log 2>/dev/null;
f() { return $1; }; f $ret; }; }
- popd
before_script:
# ensure cores are generated (~after_failure)
test $MAINT_EXTRA -ne 0 || ulimit -S -c unlimited
script:
- test $MAINT_EXTRA -ne 0 || ./run-tests -c
# http://relaxng.org/relaxng.rng
- test $MAINT_EXTRA -eq 0 || curl -Ss
https://raw.githubusercontent.com/relaxng/jing-trang/master/eg/relaxng.rng
| find -name '*.rng' -exec xmllint --noout --relaxng - {} +
after_failure:
- test $MAINT_EXTRA -ne 0 || sudo apt-get install -qq gdb libc6-dbg
# examine core files
# TODO: eu-readelf -n binary|sed -n 's/^.*Build ID: //p'
# etc. to ensure build-id match
- test $MAINT_EXTRA -ne 0 || find -name 'core*' -print0
| xargs -0I@ -- sh -xc
'file "@";
gdb -se $(file "@" | sed -n "s|.* core file .* from \x27\([^\x27 ]*\).*|\1|p")
-c "@" -batch -ex "t a a bt f" -ex "set pagination 0"'
after_success:
test $MAINT_EXTRA -ne 0 || coveralls
notifications:
irc: "irc.freenode.net#clusterlabs-dev"