-
Notifications
You must be signed in to change notification settings - Fork 90
/
.travis.yml
41 lines (40 loc) · 1.3 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
language: python
matrix:
include:
- name: Linux 64-bit
sudo: required
services:
- docker
env:
- CIBW_SKIP=*manylinux1_i686*
- name: Linux 32-bit
sudo: required
services:
- docker
env:
- CIBW_SKIP=*manylinux1_x86_64*
- name: macOS
os: osx
language: generic
env:
global:
- TWINE_USERNAME=michael.sanders
# Note: TWINE_PASSWORD is set in Travis settings.
script:
- "pip install cibuildwheel==1.1.0 setuptools-rust==0.10.3"
- export RUST_BACKTRACE=1
- export CIBW_BEFORE_BUILD="pip install setuptools-rust==0.10.3 && source ./scripts/travis"
- export CIBW_SKIP=cp34-*\ $CIBW_SKIP
- export CIBW_ENVIRONMENT="CI=\"$CI\" TRAVIS_BRANCH=\"$TRAVIS_BRANCH\" TRAVIS_COMMIT=\"$TRAVIS_COMMIT\" PATH=\"\$HOME/.cargo/bin:\$PATH\""
- export CIBW_TEST_COMMAND="python -c 'import autopy'"
- git fetch --unshallow
- cibuildwheel --output-dir wheelhouse
- |
if [[ ! -z "$TRAVIS_TAG" ]]; then
pip install twine
python -m twine upload wheelhouse/*.whl
elif [[ "$TRAVIS_BRANCH" = "master" ]] && [[ -z "$TRAVIS_PULL_REQUEST_SHA" ]]; then
export TWINE_PASSWORD="$TWINE_TEST_PASSWORD"
pip install twine
python -m twine upload wheelhouse/*.whl --repository-url https://test.pypi.org/legacy/
fi