-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
78 lines (68 loc) · 1.93 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
os: linux
dist: bionic
language: python
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
branches:
only:
- master
on:
tags: true
before_deploy:
- git config --local user.name "cmorganl"
- git config --local user.email "c.morganlang@gmail.com"
env:
global:
- CIBW_SKIP="cp27-* pp27-* *-manylinux_i686"
- TWINE_USERNAME=__token__
# Note: TWINE_PASSWORD is set to an API token in Travis settings
- PIP="python3 -m pip"
- TWINE_REPOSITORY=pypi
- TWINE_REPOSITORY_URL=https://upload.pypi.org/legacy/
- TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
jobs:
include:
- services: docker
- os: osx
language: shell
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git;
fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then
sudo apt -y install gcc dpkg-dev curl zip git libz-dev python3-distutils python3-dev;
fi
install:
- "$PIP install -r requirements.txt"
- "$PIP install -U setuptools"
- "$PIP install -U cibuildwheel"
- "$PIP install --upgrade pip"
- "$PIP --version"
- "$PIP install codecov"
- "$PIP install twine"
- "$PIP install tox-travis"
script:
# tox -a: List the environments available, nothing else
# tox -v: Run the selected environments. This is controlled by tox-travis on Travis CI, and the [travis] env in tox.ini
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then
tox -a;
tox -v;
fi
- python3 -m cibuildwheel --output-dir wheelhouse
- python3 setup.py sdist --dist-dir wheelhouse
notifications:
email:
on_success: never
on_failure: always
after_success:
- ls wheelhouse/
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
$PIP install twine;
python3 -m twine upload --skip-existing wheelhouse/*.whl;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
python3 -m twine upload --skip-existing wheelhouse/*.whl wheelhouse/*tar.gz;
fi