This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
122 lines (117 loc) · 3.85 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
os: linux
language: python
env:
global:
# Doctr deploy key for srwpy/srwpy
- secure: "q1nNgipYqtP21/mnC5847xgsvVAEYWIQiXxe9pvPtVGS5v4+wYgoOSD9ppa3E9fut7JdLDV5TfkU+Ty93Oxjwy/WEUEon7Zrum/lAMCxcwJ5ri/5GXS1RKnc+JgLbNUmjixmFIX9X4ve4yzoWeb/gw6DEgLbmZjP5dJIpcWI6gCzQuOOwTO59PPWI45dye4a7VzNHKUtHAFW7qECeMvNTcblv3QIL9HUw8HALXAwHhmKBfPKoJoWc8t7f7VGxIqcOkdpmvZFCXYfkjqxmTZlbNu6zZJdBRNnpskpQieDyFxxZyv9l1xBhfcaSsVCjuOUeO8OrrTUBjIsH1EaPGLZ8+V8HbO8tCPaQZm9jRhwqWoXHTc1ZkdzYRDQAAM0H99L5eyEPVqv12A0BQhc4RfMa6yWMmDTYRqvwtLCi0U9UNzwvCSV10d/gJpD1dcHs8DUOtjFNBiwrdT4DKY/iDy8C6gzTo1XQFoETaQ2gdZDi4leq1/QWV7nzottnVZnDUKgTI+ve1N6v2gRqsHU5D1JiKH7B4r+6qv4+bQvkteWY/5cTQ0Zbkq76mWsvhffb5uzY+ObHoyk4X+0MA81BHjLOmy+++k4FySiKtsbq23NmbapWd4wSmPER4DaIg8G2x91Zv8vOlt3KxiOUpYITeMlRj7EH2XX4P8ablZ3p1R+yIM="
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.ccache"
services: docker
jobs:
fast_finish: true
include:
- os: linux
- os: linux
python: "3.7"
env:
- NO_DOCKER=1
- BUILD_DOCS=1
- DEPLOY_DOCS=1
- UPLOAD_SDIST=1
- os: osx
language: generic
env:
- PYTHON=3.5
- os: osx
language: generic
env:
- PYTHON=3.6
- os: osx
language: generic
env:
- PYTHON=3.7
# - BUILD_DOCS=1 # not sure why it hangs forever on the first example
- os: osx
language: generic
env:
- PYTHON=3.8
before_install:
- env | sort -u
- |
if [ "$TRAVIS_OS_NAME" == "linux" -a -z "$NO_DOCKER" ]; then
set -e
docker pull quay.io/pypa/manylinux1_x86_64
docker images
docker ps -a
fi
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
pushd ${HOME}
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh -b -p ${HOME}/conda
rm -fv Miniconda*.sh
popd
export PATH=${HOME}/conda/bin:$PATH
conda info
conda create -n py${PYTHON} python=${PYTHON} -y
conda env list
source activate py${PYTHON}
conda list
fi
script:
- python --version
- python -m site
- pip install -r requirements-dev.txt
- |
if [ "$TRAVIS_OS_NAME" == "linux" -a -z "$NO_DOCKER" ]; then
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/.travis/build-wheels.sh
fi
- |
if [ "$TRAVIS_OS_NAME" == "osx" -o ! -z "$NO_DOCKER" ]; then
pushd core/
make all
popd
pip install delocate
python setup.py bdist_wheel
delocate-listdeps dist/*.whl && delocate-wheel -v dist/*.whl
if [ ! -z "$NO_DOCKER" ]; then
# Generate source distribution only once
python setup.py sdist
fi
python setup.py build_ext --inplace
pip install -v .
fi
- |
if [ "$TRAVIS_OS_NAME" == "osx" -o ! -z "$NO_DOCKER" ]; then
pytest -vvvv
fi
- ls -laF dist/
# - coverage run -m pytest # Run the tests and check for test coverage.
# - coverage report -m # Generate test coverage report.
# - codecov # Upload the report to codecov.
# - flake8 --max-line-length=115 # Enforce code style (but relax line length limit a bit).
- |
if [ "$BUILD_DOCS" ]; then
set -e
make -C docs html # Build the documentation.
fi
- |
if [ ! -z "$TRAVIS_TAG" ]; then
# Build docs on tag only
if [ "$DEPLOY_DOCS" ]; then
pip install doctr
doctr deploy --built-docs docs/build/html .
fi
# Upload the content of dist/*.whl to a public wheelhouse
pip install twine
echo "[pypi]" > $HOME/.pypirc
echo "username: $TWINE_USERNAME" >> $HOME/.pypirc
echo "password: $TWINE_PASSWORD" >> $HOME/.pypirc
if [ ! -z "$UPLOAD_SDIST" ]; then
twine upload dist/*.tar.gz
else
twine upload dist/*.whl
fi
fi