forked from mapnik/python-mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (84 loc) · 3.41 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
language: generic
matrix:
include:
- os: linux
sudo: false
compiler: clang
# note: only using ccache for CC is intentional here to
# workaround an odd bug in distutils that manifests when only `ccache` is used to link
# because distutils also has a bug whereby CC is used to compile instead of CXX, this works :)
env: JOBS=8 CXX="clang++-3.9 -Qunused-arguments" CC="ccache clang-3.9 -Qunused-arguments"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test']
packages: [ 'libstdc++-5-dev', 'gdb', 'apport']
- os: osx
osx_image: xcode8.2
compiler: clang
env: JOBS=4
cache:
directories:
- $HOME/.ccache
env:
global:
- secure: "CqhZDPctJcpXGPpmIPK5usD/O+2HYawW3434oDufVS9uG/+C7aHzKzi8cuZ7n/REHqJMzy7gJfp6DiyF2QowpnN1L2W0FSJ9VOgj4JQF2Wsupo6gJkq6/CW2Fa35PhQHsv29bfyqtIq+R5SBVAieBe/Lh2P144RwRliGRopGQ68="
- secure: "idk4fdU49i546Zs6Fxha14H05eRJ1G/D6NPRaie8M8o+xySnEqf+TyA9/HU8QH7cFvroSLuHJ1U7TmwnR+sXy4XBlIfHLi4u2MN+l/q014GG7T2E2xYcTauqjB4ldToRsDQwe5Dq0gZCMsHLPspWPjL9twfp+Ds7qgcFhTsct0s="
- BOOST_PYTHON_LIB="boost_python"
- BOOST_SYSTEM_LIB="boost_system"
- BOOST_THREAD_LIB="boost_thread"
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
before_install:
# workaround travis rvm bug
# http://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
rvm get head || true
fi
- source scripts/setup_mason.sh
- export PYTHONUSERBASE=$(pwd)/mason_packages/.link
- export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python2.7/site-packages
- export PATH=$(pwd)/mason_packages/.link/bin:${PYTHONUSERBASE}/bin:${PATH}
- export MASON_BUILD=true
- export COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
- |
if [[ $(uname -s) == 'Linux' ]]; then
export LDSHARED=$(python -c "import os;from distutils import sysconfig;print sysconfig.get_config_var('LDSHARED').replace('cc ','clang++-3.9 ')");
mason install clang++ 3.9.1
export PATH=$(mason prefix clang++ 3.9.1)/bin:${PATH}
which clang++
else
sudo easy_install pip;
export LDSHARED=$(python -c "import os;from distutils import sysconfig;print sysconfig.get_config_var('LDSHARED').replace('cc ','clang++ ')");
fi
- pip install --upgrade --user nose
- pip install --upgrade --user wheel
- pip install --upgrade --user twine
- pip install --upgrade --user setuptools
- pip install --upgrade --user PyPDF2
- python --version
install:
- mkdir -p ${PYTHONPATH}
- python setup.py install --prefix ${PYTHONUSERBASE}
before_script:
# start postgres/postgis
- source mason-config.env
- ./mason_packages/.link/bin/postgres -k ${PGHOST} > postgres.log &
script:
- python test/run_tests.py
- python test/visual.py -q
# stop postgres
- ./mason_packages/.link/bin/pg_ctl -w stop
- |
if [[ ${COMMIT_MESSAGE} =~ "[publish]" ]]; then
python setup.py bdist_wheel
if [[ $(uname -s) == 'Linux' ]]; then
export PRE_DISTS='dist/*.whl'
rename 's/linux_x86_64/any/;' $PRE_DISTS
fi
export DISTS='dist/*'
$(pwd)/mason_packages/.link/bin/twine upload -u $PYPI_USER -p $PYPI_PASSWORD $DISTS
fi
notifications:
slack:
secure: dZhYCFXTvn6zna7GhagCUcInfhoUf/AMkTpJKPnJgaGnS3DlfbnMsSU73J4hs46wCOFII3AfYUOI/SUEBZ15lkJHfBsCku0a5a2M8g5ddxKFoIM8gosH3dLjeGJ5Ou8zNQGyzokXidKfHC+Gh4UVGyn+aeXxglRmRkUeaP+GD1k=