forked from YannickJadoul/Parselmouth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
225 lines (203 loc) · 9.43 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
language: cpp
dist: trusty
sudo: false
cache:
ccache: true
directories:
- $HOME/Library/Caches/Homebrew
env:
global:
- BUILD_TYPE=Debug
- secure: MXiwE0nmtuJfodSofdsRwD03JtbI9VgwHs+h5gsn/lP/ZrdKDSHPIOfLa2LyaFJWzwv45+NKxAyfJWBOYQ06eSq036FdiBsWkYmuSQcEGkKdB+EDxd4lUX3MxeTGMvBCng3PPyM2aDm117FD6xQTjblvpd87cJyCQWuanEczmj/5vGgBQKqHuOdH2CfoKbtzeo46uS/taNbI5jhGaGPeKk+VmzJtO79CdAGathvb2W0JKTqEsQGszty6DC1Gdt1bNQ5N+MJ2KFC/yGvG0/jgXJYB5s3viCHW0dez5Dl5Bqk4VVaCsqYg+kZGtI7FznSvFXybBj7g4HlNH80DQXlhxwk7iTHfKUQFrwSUMg0ojibERiHG0/UJXFf5fttjbU/6+Mdag+Bxb5J+f/fGZu6JEsEIoEbXBgi6Q5weYh0r2qQ0g/qZpF6g9eEQHdW6ATg9rBFqJPsmGZmqFYwvTi5cu+jGmVihl8nOir7WfyZbnEsd0TcDgDraABjLL18SDwpbFahcbr4L+rzd+4J3j6ToO78SQOMJglprZM08YReTXzdkXtINAOogoNQWfbzUpXL9AjGAcTLmbzhJwP/WAIzFDuM2X5ElOwvwqjL4gsSDDwGsn1cNbMp2pN4UlptoxpyLAF5IiYcw6TrgqzKq6R5GYnCNcsXMpsbkNGd0AcJoK/U=
compiler: gcc
matrix:
include:
- env: PYTHON=2.7 GCC=7
addons: &gcc7
apt:
sources: [ubuntu-toolchain-r-test]
packages: [g++-7]
- env: PYTHON=3.4 GCC=7
addons:
apt:
sources: [ubuntu-toolchain-r-test]
packages: [python3-pip, g++-7]
- env: PYTHON=3.5 GCC=7
addons:
apt:
sources: [ubuntu-toolchain-r-test, deadsnakes]
packages: [g++-7, python3.5-dev, python3.5-venv]
- env: PYTHON=3.6 GCC=7
addons: *gcc7
- env: PYTHON=3.7 GCC=7
# https://github.com/deadsnakes/travis-ci-python3.7-example
dist: xenial
sudo: required
addons:
apt:
sources: [ubuntu-toolchain-r-test, deadsnakes]
packages: [g++-7, python3.7-dev, python3.7-venv]
- env: PYTHON=2.7 GCC=7 BUILD_TYPE=Release
addons: *gcc7
- env: PYTHON=3.6 GCC=7 BUILD_TYPE=Release
addons: *gcc7
- env: PYTHON=2.7 GCC=8
addons: &gcc8
apt:
sources: [ubuntu-toolchain-r-test]
packages: [g++-8]
- env: PYTHON=3.6 GCC=8
addons: *gcc8
- env: PYTHON=2.7 CLANG=6.0
compiler: clang
addons:
apt:
sources: [llvm-toolchain-trusty-6.0, ubuntu-toolchain-r-test]
packages: [clang-6.0, libstdc++-7-dev]
- env: PYTHON=3.6 CLANG=6.0
compiler: clang
addons:
apt:
sources: [llvm-toolchain-trusty-6.0, ubuntu-toolchain-r-test]
packages: [clang-6.0, libstdc++-7-dev]
- env: PYTHON=2.7
os: osx
osx_image: xcode10
compiler: clang
- env: PYTHON=3.7
os: osx
osx_image: xcode10
compiler: clang
- stage: wheels
if: branch != docs
script:
- $PYTHON_CMD setup.py -q sdist -d wheelhouse
before_deploy:
- &bintray-before-deploy |
PARSELMOUTH_VERSION=`python setup.py --version`
echo "{
\"package\": {
\"name\": \"CI-Wheels\",
\"repo\": \"Parselmouth\",
\"subject\": \"yannickjadoul\"
},
\"version\": {
\"name\": \"$TRAVIS_BRANCH-$PARSELMOUTH_VERSION\",
\"desc\": \"Latest wheels for $TRAVIS_BRANCH branch for version $PARSELMOUTH_VERSION\",
\"released\": \"\",
\"vcs_tag\": \"$TRAVIS_TAG\"
},
\"files\": [{\"includePattern\": \"wheelhouse/(.*)\", \"uploadPattern\": \"$TRAVIS_BRANCH/\$1\", \"matrixParams\": { \"override\": 1 }}],
\"publish\": true
}" > bintray.json
deploy:
- &bintray-deploy
provider: bintray
file: bintray.json
user: YannickJadoul
key:
secure: an0RPZkTc9vqCe9mdik94fSImmnCsiZLmd6HPncfczfGWJdo5iEP9FbmdHMC47mnl+kNiHGS/3dyhGtkbtwAihGLOVfPjyTk4JXac7c4YwhYAvlzRWeKafti0Cg1lmdGlX1CUowDzpuKROiOqjeN4fYvKjVfCqNCVPvluQpkX/RVNAdzbNQggggSvh3Blf2WNVflGdd0RNUr1Z4gZGyH6DbkZ2zbOt7PRU0cYm2NEbgN/mKPGpoKK1voWrSa57r3DYo+nbtk76oTGnqK7j8E4pOxr0uUCSwAYj5cIoOlcErZICDyyNLULgROPv8oXqhpZ8HkyTOMkUK2Lniq9h5kwmkby9GiRFBtLMJTU9rAHTwmP9AdF2eKngQf69Tw/f9UqvDjpsoBxshoZecI+Wsf5IJ/qc8Zffx4lm7k4uHl+Y8fcXCi5VtqODtOwSa/KIkGSLIus4PKaTO++7jmUA/DKEhUgTQfosYdUUUm2lua3ZMJ1o62M73XFFUxn5G5NaR5G/mosgsoFcJ3vnejt+ljf7j5C7Du7Hx3gZDwMzhrYG2DJEoRUNEahJV4djFsiDyIhoyYSsuLr0jQnT3//f5uqSlMP7PE4f98NEQxixM4naZaizBggyyAXwvlFxqqmxJxDq5dZCVgJTc3dTeEgJCi/Q5vURZqWvXt/EeLyB7anO4=
skip_cleanup: true
on:
all_branches: true
- &github-releases-deploy
provider: releases
api_key:
secure: a/odACohfUh1T00U/v2T9TCiY4KRfgUwBsFJHf1mzmaphZIPwY8lLgYC1HvV7FD+ijrV9FQVxh+u5A+JbHlDSioW5LE5WXaB4KOYUphcCgoy47/FbyxJpQWNy62segip6/RDvKhpgHCc0Ii8qgXBSLtjyoiCRxbXyfX2u5EbD5fkU5Wip4o7Mqk2cp5NEXWx/u76SvOHH+zhueM2MkP4HvPSMI20jFs1vxb4VNK1EE++GdcZq3mwWFAJyPkuMVKxSF430Svm/qkE33btFQpdtAkUdh0jVu+tBD3RBOHvPAKab4uvDU2Pl5WFl+LYwyYKoZYQAIKVhGrwMbb5LlAaR0sfhq4YqT8HMqPBUPEOMo6OQ3zBoQER7QzHPQRFJBPptNMLtc3ugo0YdDc7bHlocDCah2TErlrzEzNxiC0vFCYv+hVSllWtQwMf56s/6LTQVxgska63tqUWbfA6M4yV37s9wJQsyrdlKnepJWdDDm1WxrZ0nhwxMN/tR+TmYi+tnDkY+JxPwBXyibg/ZARn+7spdjrKbE3uKFwQG2OqkJXiW3LOc7VDyK/s5mj1qJmHDTjTOlwyw5BDclkHAF3hvnci7BefkRRKpba01neFmoMHhdidhvvwLCxhEPTgGKW0rwUfMPJpElWJkjI1OmCpwyyEeOP0IOIZKmvdajsINJY=
tag_name: $TRAVIS_TAG
file_glob: true
file: wheelhouse/*
skip_cleanup: true
on:
repo: YannickJadoul/Parselmouth
tags: true
draft: true
- stage: wheels
os: linux
sudo: required
services:
- docker
install:
- $PYTHON_CMD -m pip install --user cibuildwheel
- mkdir gcc-i386 && wget -q https://github.com/Noctem/pogeo-toolchain/releases/download/v1.5/gcc-7.3-centos5-i686.tar.bz2 -O - | tar xj -C gcc-i386 --strip-components=1
- mkdir gcc-x86_64 && wget -q https://github.com/Noctem/pogeo-toolchain/releases/download/v1.5/gcc-7.3-centos5-x86-64.tar.bz2 -O - | tar xj -C gcc-x86_64 --strip-components=1
- mkdir ccache && wget -q https://www.samba.org/ftp/ccache/ccache-3.6.tar.bz2 -O - | tar xj -C ccache --strip-components=1
script:
- export CIBW_ENVIRONMENT='ARCH=`uname -i` PATH="`pwd`/gcc-$ARCH/bin:$PATH" CC="ccache cc" CXX="ccache c++" CXXFLAGS="-static-libstdc++" CCACHE_BASEDIR=`python -c "import tempfile; import os; print(os.path.realpath(tempfile.gettempdir()))"` CCACHE_DIR=/host'$HOME'/.ccache PARSELMOUTH_EXTRA_CMAKE_ARGS="-DPREBUILT_PRAAT_DIR=\"`pwd`/praat_build_$ARCH/praat\""'
- export CIBW_BEFORE_BUILD='pip install cmake && [ -d ccache/$ARCH ] || (unset CC CXX CXXFLAGS && mkdir ccache/$ARCH && cd ccache/$ARCH && ../configure && make install) && [ -d praat_build_$ARCH ] || (mkdir praat_build_$ARCH && cd praat_build_$ARCH && cmake -DCMAKE_BUILD_TYPE=Release .. && make praat -j 2)'
- if [ "$TRAVIS_BRANCH" == "docs" ]; then export CIBW_BUILD="cp36-manylinux1_x86_64"; fi
- cibuildwheel
before_deploy:
- *bintray-before-deploy
deploy:
- *bintray-deploy
- *github-releases-deploy
after_deploy:
- curl -X POST -d "branches=$TRAVIS_BRANCH" -d "token=$READTHEDOCS_WEBHOOK_TOKEN" https://readthedocs.org/api/v2/webhook/parselmouth/15985/
- stage: wheels
if: branch != docs
os: osx
osx_image: xcode10
compiler: clang
install:
- $PYTHON_CMD -m pip install cibuildwheel
script:
- mkdir praat_build && cd praat_build && cmake -DCMAKE_BUILD_TYPE=Release .. && make praat -j 2 && cd ..
- export PARSELMOUTH_EXTRA_CMAKE_ARGS="-DPREBUILT_PRAAT_DIR=\"`pwd`/praat_build/praat\""
- export CCACHE_BASEDIR=`$PYTHON_CMD -c "import tempfile; import os; print(os.path.realpath(tempfile.gettempdir()))"`
- cibuildwheel
before_deploy:
- *bintray-before-deploy
deploy:
- *bintray-deploy
- *github-releases-deploy
branches:
except:
- appveyor
stages:
- name: test
if: branch != docs
- name: wheels
before_install:
- set -e
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ -n "$GCC" ]; then
CC=gcc-$GCC
CXX=g++-$GCC
elif [ -n "$CLANG" ]; then
CC="ccache clang-$CLANG -Qunused-arguments"
CXX="ccache clang++-$CLANG -Qunused-arguments"
# -Qunused-arguments: https://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html
fi
if [ "$PYTHON" == "3.5" ] || [ "$PYTHON" == "3.7" ]; then
python$PYTHON -m ensurepip --user
elif [ "$PYTHON" = "3.6" ]; then
pyenv global system $PYTHON # https://github.com/travis-ci/travis-ci/issues/8363
fi
PYTHON_CMD=python$PYTHON
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
unset -f cd; # Workaround for weird 'shell_session_update' issue: https://github.com/travis-ci/travis-ci/issues/8703
brew update > /dev/null
brew install ccache
export PATH=/usr/local/opt/ccache/libexec:$PATH
if [ "${PYTHON%%.*}" == "3" ]; then
brew outdated python || brew upgrade python
PYTHON_CMD=python3
else
brew unlink python && brew install python@2 || brew upgrade python@2
PYTHON_CMD=python2
fi
CC=clang
CXX=clang++
fi
$PYTHON_CMD -m pip install --user --upgrade pip wheel
export PIP_ONLY_BINARY="numpy"
# PIP_ONLY_BINARY since there are no NumPy binary wheels available for Python 3.4 and NumPy versions >= 1.16.0
install:
- $PYTHON_CMD -m pip install --user --upgrade numpy
- $PYTHON_CMD -m pip install --user -r tests/requirements.txt
script:
- mkdir build && cd build && cmake -DPYBIND11_PYTHON_VERSION=$PYTHON -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- make all -j 2
- make tests