-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
146 lines (128 loc) · 6.68 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
145
146
# Based on the "trust" template v0.1.1
# https://github.com/japaric/trust/tree/v0.1.1
dist: trusty
language: rust
services: docker
sudo: required
# Config file for automatic testing at travis-ci.org
# This file will be regenerated if you run travis_pypi_setup.py
env:
global:
# TODO Update this to match the name of your project.
- CRATE_NAME: rust_pypi_example
# Rust release. E.g. Stable, nightly, nightly-2014-12-18
- RUSTRELEASE: stable
- RUSTCOMPILER: RUSTUP
- TWINE_USERNAME: mckaymatt
- secure: Q94OKGYoeYE7HV8xTAwjf0qxw72+6hI14wAMhMfALkpWgtsWVyUdIJPTWm5s1WJrWdeZmSNK1oQjALBLV9yD1DNZgHw8lC/nTI2qY7ywpRUmrVHfeSy5YKbzeIeHC1gNLWQhq1Mc9vF7x2LWE2pI/6NuDP5uRx0NrnKw64z0P/kDGDKPDQ8kgOq8kayTSzaibMk4iNxv2h91PnWelYiKo0OluRahEYzyvl29NilmVgfJ3jpcC78nuJe4622vfVBhmGps3bZHC8D+7qSvU6TiFe/S+fXLdebe/SCujwUhSOSgsvl4YzLvUe2FFftOG5NJRwJa6EqkQRZ+1JmVO2OA5g3Mg93Tb+aDT/j597YQJYz5hDpuQTLjvsQEjbtSlDZoaNo5OeXkiutflgGXNj7NvOGNYfEvGeNb1dqsbEQyIG6aBFZy4yMWgXILjTZmH0tYpsshGPFL+yIH5aXGsbIt918F9tazy1IuSPcwcmaL1tEhsM5ETn4n1P7X1jY9yHCsg5i8RYWhF6SsHn0L/UTg2+y4nJ3odWtlXzf9BWAo1c/frhC7BJDea09vgplfeIERYuQIGDcZP5LhGkxE+gZc8MEAj9UvryjOuv/znO+1irSRV4xi4H9Yvsy/tbpWnM3Qedy9ekt1PpMgolHNoKXKh2PKPp4uJc/c12LtNNU4x7s=
matrix:
include:
# TARGET is the rust target triplet
# WHEELPLATFORM - is the wheel platform target that is passed in as
# python setup.py bdist_wheel --plat-name=<WHEELPLATFORM>
# E.g. "macosx_10_11_x86_64", "win_amd64", "manylinux1_x86_64"
# Using "manylinux1_i686" or "manylinux1_x86_64" will initiate a
# special "manylinux build"
# PYENV - single version, or comma seperated list of versions to build against
# Not relevent if using "manylinux" because python is already installed in
# the manylinux docker container and those are used instead
# RUSTCOMPILER - which build tools do we intall for rust. options are RUSTUP or CROSS.
# This option is ignored when building a manylinux wheel
# Also, at this time you would have to integrate Cross yourself.
# Linux
# we are using Rustup instead of cross when WHEELPLATFORM="*manylinux*". This is because both
# manylinux and Cross depend on Docker but the shared libs in the Cross contains are too new
# to make valid manylinux containers.
#
# You can lean more about the differnt Rustup toolchains here:
# https://github.com/rust-lang-nursery/rustup.rs#toolchain-specification
#
# More on manylinuyx at https://github.com/pypa/manylinux
# and the pep https://www.python.org/dev/peps/pep-0513
#
# one other thing about manylinux. Since the container contains several versions of python,
# we build/test against all of them at the same time. I have it set up to run against
# cp27-cp27m, cp27-cp27mu, cp33-cp33m, cp34-cp34m, cp35-cp35m, cp36-cp36m
# PYENV versions isn't relevent here so just keep it at 3.6.1
- env: TARGET=i686-unknown-linux-gnu PYENV=3.6.1 WHEELPLATFORM=manylinux1_i686
- env: TARGET=x86_64-unknown-linux-gnu PYENV=3.6.1 WHEELPLATFORM=manylinux1_x86_64
# Note that musl isn't covered by manylinux and I had trouble building
# dylibs with it as well
# - env: TARGET=i686-unknown-linux-musl PYENV=2.7.13 WHEELPLATFORM=
# - env: TARGET=i686-unknown-linux-musl PYENV=3.6.1 WHEELPLATFORM=
# - env: TARGET=x86_64-unknown-linux-musl PYENV=2.7.13 WHEELPLATFORM=
# - env: TARGET=x86_64-unknown-linux-musl PYENV=3.6.1 WHEELPLATFORM=
# OSX
# See versions https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
# current default is osx_image: xcode7.3 OS X 10.11
# xcode6.4 seems to segfault with rustup or cross
- env: TARGET=x86_64-apple-darwin PYENV='3.6.1,3.5.3,3.4.6,2.7.13' WHEELPLATFORM=macosx_10_11_x86_64
os: osx
osx_image: xcode7.3
- env: TARGET=x86_64-apple-darwin PYENV='3.6.1,3.5.3,3.4.6,2.7.13' WHEELPLATFORM=macosx_10_12_x86_64
os: osx
osx_image: xcode8.1
before_install: set -e
install:
- bash ci/pyinstall.sh
- bash ci/install.sh
- source ~/.cargo/env || true
script:
- bash ci/script.sh
deploy:
# After you create the Github repo and add it to Travis, run the
# travis_pypi_setup.py script to finish PyPI deployment setup
# this is for pypi. Will fail if you haven't run
# "python -m twine register ... " to register with pypi
- provider: script
script: ci/pypi_upload.sh
skip_cleanup: true
on:
tags: true
- provider: releases
# TODO update `api_key.secure`
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
# - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789
# - Paste the output down here
api_key:
secure: "Wfy2/s+LddUBK4TfKcrXVLJO8TQQEY+ZMYKjwOGnjjHdM0FzcHfKauLr2by10o1qKzV+KpsJov/HZdlAK8jfOvzrMPLQWzjhEp8yxSFhyfy1gCEdPZY1rNCpVM9S/JYIl4QHpzr+fQq67ZHn9Qx72ImsRUweq77aqNL9vRlWRsCr4bQwvLG6cka3NJ5yf8m4xdQ/X9pdxGePryxpzah+KKvpXgHjJ+hAa0ckVE7OAYz5fhu3ceaGbU1Dw3g2Tzthcd2BpDN+tZf9CDqKfCvQ7AdVWzB/lcl21COZ+p8NepPjcg+OF8Nt4ez6aMTutlpECJPf0i2zhiLK8bljol6NYUjRJTobnUV8EQaBxDha447ExrmtGKscKjh0u7ys7ARZqztUvDj6CHOz14hEoI7duBN094x9KihPOoWSMmZ2hFIDUaLa9AcQWZjhAFChFDa95hhxs3kLx80Azx6uwEJ6ETA/ZlNrW9FFnCwrWL/k9QhT1UvtuHgRhZV8snp0pAdgQ8HCgyWAr1c1KNJ9AuXs1My9kVjcbXcglCmRp0JLDo0MA8iALfkOvLpdkK6viFq29Lp7WgPpSNRUGB70DBFUzMTim/GkeOrpCc6TcN+vKN7/XVG/OkmB/XA1+S1lOEtzJZlZaqms9Pi1L75deu08pK62SBzsxjSGdjwMwtToT2k="
file_glob: true
file: wheelhouse/rust_pypi_example*.whl
skip_cleanup: true
on:
# TODO Here you can pick which targets will generate binary releases
# In this example, there are some targets that are tested using the stable
# and nightly channels. This condition makes sure there is only one release
# for such targets and that's generated using the stable channel
condition: $TRAVIS_RUST_VERSION = stable
tags: true
before_cache:
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cache/pip
- chmod -R a+r $HOME/.cache/pyenv
- chmod -R a+r $HOME/.cargo
- chmod -R a+r $HOME/.rustup
- chmod -R a+r $HOME/.manylinux_pip_cache
- chmod -R a+r $HOME/.manylinux_rustup_cache
- chmod -R a+r $HOME/.manylinux_cargo_cache
cache:
# There is a "cache: cargo" option but it's fails if target/ isn't in the build dir
directories:
- $HOME/.cache/pip
- $HOME/.cache/pyenv
- $HOME/.cargo
- $HOME/.rustup
- $HOME/.manylinux_pip_cache
- $HOME/.manylinux_rustup_cache
- $HOME/.manylinux_cargo_cache
branches:
only:
# release tags
- /^v\d+\.\d+\.\d+.*$/
- master
notifications:
email:
recipients:
- mckaymatt@gmail.com
on_success: never
on_failure: never # default: always