-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
145 lines (139 loc) · 4.12 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
language: python
sudo: false
python:
- 2.7
- 3.4
- 3.5
- 3.6
os:
- linux
- osx
matrix:
exclude:
- os: osx
python: 2.7
- os: osx
python: 3.4
- os: osx
python: 3.5
- os: osx
python: 3.6
include:
- sudo: required
python: 3.6
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
- os: osx
python: 2.7
language: generic
env: PYTHON=2.7
- os: osx
python: 3.4
language: generic
env: PYTHON=3.4
- os: osx
python: 3.5
language: generic
env: PYTHON=3.5
- os: osx
python: 3.6
language: generic
env: PYTHON=3.6
allow_failures:
- os: osx
env:
global:
# $PYPIPASSWORD
secure: qo57dxY6zF76pgz34Qq5a4W0o/ra9hMCAg6xivX7XOehE6vyN/tQkm5V9ZknvXEnwHZDDPu3568Tmdm4D59FtNsOedZHNrtroCKnOZnRZfsWhQYDzK7/7QnlqWBbPRdw9AgdipND3RK85gySsne7SUlDRrF2DRvKefxgeXPysR8URRHDbcCPxFDkdKbpXOEbn2ur8hC1ipKwqxEWkK5fQEmayYkNQOFmnjyRukGoH5JT48QOMJUsDWLfrDq6kpyAI3nk4RNw32tgavOQ28UCefj8gf/JXbsqVq8hW/L4LQLN7eai97hqz3Ew4MsqleDDroY88axTkMJG/dBg55YASs7ZwJYaIMBrryAAmXj+uB4TzDN/uKdZpkPek6WzuLKmcOb7K1WCYuqTPXbEdsJSkKtxz9xFGF9P1/jKFcQK0t+RalvL+i11hGsrkDfNu4xehmdKHzKiyUcH7wxOWc3iG4kbmmYUMY0Ynf+zSCE/GJ2ABRp24k1dfwJnd1WflqhGyIcd3jrzGX7zEI4TWPA/37XYx9S6fG7MdX2vbJliRGxzWWUKXECcSRqZH8bx3gdUeM00zbBS9v7xfYVcu9c3VxhxOz3U5XKzbozeffysOhpRuxMAze6M+fH6pF/Yq335qB699Qm4JctP30itXTH463fpc4L1/kQ+YoRJ16VFjSs=
before_install:
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
sudo apt-get update -qq
else
brew update
brew cask uninstall oclint
brew install gcc5
brew outdated pyenv || brew upgrade pyenv
eval "$(pyenv init -)"
PYVER=${PYTHON}
# Install the latest release of the specified Python version using pyenv.
PYVER="$(pyenv install --list | grep -E "^\\s*$PYVER" | sort -n -t. -k3 | tail -n1)"
pyenv install $PYVER
pyenv global $PYVER
echo "Selected Python $PYVER"
python --version
export CC=gcc
export CXX=g++
fi
install:
- python -m pip install --upgrade pip
- python -m pip install --upgrade wheel
- python -m pip install pkgconfig
- python -m pip install pybind11
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
python -m pip install auditwheel
sudo apt-get install libeigen3-dev
else
brew install eigen
fi
- |
if [[ -n "$DOCKER_IMAGE" ]]; then
docker pull $DOCKER_IMAGE
fi
before_script:
- |
if [[ -z ${DOCKER_IMAGE} ]]; then
# At first instal openbabel
mkdir external
cd external
git clone https://github.com/openbabel/openbabel
cd openbabel
mkdir build
cd build
cmake -DBUILD_SHARED=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DWITH_INCHI=ON -DWITH_STATIC_INCHI=ON -DCMAKE_CXX_FLAGS=-fvisibility=hidden ..
make -j2
sudo make install
cd ..
cd ..
cd ..
fi
- |
if [[ -z ${DOCKER_IMAGE} ]]; then
python -m pip install -ve .
fi
script:
- |
if [[ -z ${DOCKER_IMAGE} ]]; then
python -c "import pyOBabel; print('=====\nTEST -- pyOBabel.openbabel version: ', pyOBabel.version_OB(), '\n=====')"
else
docker run --rm -v `pwd`:/io ${DOCKER_IMAGE} /io/build_in_docker.sh
fi
- |
if [[ -n ${DOCKER_IMAGE} ]]; then
ls wheelhouse/*
fi
after_success:
- |
echo "[distutils]" > ~/.pypirc
echo "index-servers =" >> ~/.pypirc
echo " pypi" >> ~/.pypirc
echo "[pypi]" >> ~/.pypirc
echo " username: rjdkmr" >> ~/.pypirc
echo " password: $PYPIPASSWORD" >> ~/.pypirc
echo "[server-login]" >> ~/.pypirc
echo " username: rjdkmr" >> ~/.pypirc
echo " password: $PYPIPASSWORD" >> ~/.pypirc
- |
pip install --upgrade twine
export TWINE_USERNAME=rjdkmr
export TWINE_PASSWORD=$PYPIPASSWORD
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
if [[ -n ${DOCKER_IMAGE} ]]; then
twine upload -u rjdkmr -p $PYPIPASSWORD --skip-existing wheelhouse/*manylinux1_x86_64.whl
fi
else
pip wheel -w wheelhouse/ --no-deps --no-cache-dir .
twine upload -u rjdkmr -p $PYPIPASSWORD --skip-existing wheelhouse/*
fi