-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy path.travis.yml
124 lines (113 loc) · 3.49 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
# In this configuration, the package is tested against multiple versions of python
# on Linux and on one version of Python on Windows. If and only if all tests pass
# will the wheels be built and deployed. Further, deployment is only initiated if
# the current branch is "master", the current commit is tagged, and the current
# repo is yours (e.g. it won't run on a Pull Request). For convenience, a source
# distribution is also created.
language: python
python:
# - 2.7
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
before_install:
- |
if [[ "$TRAVIS_OS_NAME" = windows ]]; then
choco install python --version 3.8.6
export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
fi
- |
if [[ "$TRAVIS_OS_NAME" = osx ]]; then
export PATH="/usr/local/bin:$PATH"
if [ ! -f "/usr/local/bin/gcc-9" ]; then
brew install gcc@9
fi
brew install libomp
ln -s /usr/local/bin/gcc-9 /usr/local/bin/gcc
export CC="/usr/local/bin/gcc"
fi
install:
- pip install pytest
script:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install -r python2-requirements.txt; else pip install -r requirements.txt; fi
- pip install -e .
- pytest tests/
stages:
- test
- codecov
# Only execute deployment stage on master branch, tagged commits,
# and from your repository (e.g. not PRs). Replace with your repo name.
- name: deploy
if: tag IS present
jobs:
include:
# # Optional: run a test on Windows
- os: windows
language: shell
name: Test on Windows
# # Code coverage
- stage: codecov
name: Add code coverage stats
services: docker
python: 3.6.2
install:
- pip install codecov
- pip install pytest-cov
- pip install -e .
script:
- pytest --cov=matrixprofile tests/
- codecov
# # Deploy on linux
- stage: deploy
name: Build and deploy Linux wheels
services: docker
python: 3.8
install:
- pip install twine
- pip install cython
- pip install cibuildwheel==1.7.2
script:
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*.whl --verbose --skip-existing
- python setup.py sdist --formats=gztar
- twine upload dist/*.tar.gz --verbose --skip-existing
after_success:
- ls wheelhouse/*.whl
# Deploy on mac
- stage: deploy
name: Build and deploy macOS wheels
os: osx
language: shell
install:
- python3 -m pip install twine
- python3 -m pip install cython
- python3 -m pip install cibuildwheel==1.7.2
script:
- python3 -m cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*.whl --verbose --skip-existing
after_success:
- ls wheelhouse/*.whl
# Deploy on windows
- stage: deploy
name: Build and deploy Windows wheels
os: windows
language: shell
install:
- pip install twine
- pip install cython
- pip install cibuildwheel==1.7.2
script:
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*.whl --verbose --skip-existing
after_success:
- ls wheelhouse/*.whl
env:
global:
- TWINE_USERNAME=matrixprofilefoundation
- MPLBACKEND=agg
# Note: TWINE_PASSWORD is set in Travis settings
# skip 32 bit binaries and pypy builds
- CIBW_SKIP="*-win32 *-manylinux_i686 cp27-manylinux_* pp* cp27-macosx_*"
- MACOSX_DEPLOYMENT_TARGET="10.12"