forked from PyO3/maturin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
149 lines (135 loc) · 5.9 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
147
148
149
language: rust
dist: xenial
env:
global:
- BINARY_NAME="maturin"
- secure: "KeEbcSsrkbav2rn9gaPKSJtIC6BY2A/4Y3eOHqTkFQoMIMU8Du5/4mhgAcvVQo6Gu9R2FgJUpsPXoaPNIako/1n4Qrk63GtiSvX1uHUEJccbIHtyqtjoXBl1NlQB/lHJlW98O0CVzoW0mdFGGhn7pbcfut/xyFN5vivQ8ApH5t44Oo2aZIbyxXQbXgDnMKYNHaBIWadmhzsgaSdwsilQtYCA65a3Kh65R5lWoV8Ebb97jeYxWQyhLDOcG28EnMi1noWMjSWUBtn9OQtLS6toCevup+xMVP0z67/8YneqMzelUM5uAZ07GgzCmXsEzanskNyfRJ6FO7fjNo8KtI6M5m4QtsFhNsZfLIGWqsAEKmV4Xrogbu/acOue03XfHwYqGD0vrbyIip94tPqiblFvrXgnSF0gbdy2b+onw8/FECPTVIgir99oO/1NmCFGP4ojVwIQlo8MnP6sin/L9O+UBQa1UZD4GtClAoeugUWFA/xantuHrJAnmmVIOGNtXmCivg85TXfA14OFXxtt55WEtN/pCxvoRcWpT9C/VzctVITAQvQoZqNEMHgWlL1YjrZZTYMsWfDPEuWdM1nN36BaesT005DI0gosg1jogt4kFrDA/0Mpst/2t8UvrKGxdVP8I/fyjxgaGaZkAJOL4L679iiLphdc4y+Zubf1N38Dqeg="
- secure: "jMJvcpFoNBLwG0NfDVo5LLV9vPyssFlY9Y7iNhHD47BjpYaryn4aA40ClIjfyJ3ktcdXt97Alu4aoQEw0UIFZSlpzcfuSWhYs0CAJ/ozefXKCD8E+RdzVQxZKVhRsCgoo4u1CL1OwtU1Pg+N0EWv3Mpbcs0l+SbozMTHk/xubg1O75qkbEsUZXMEV4IDEi5AtdJ13TUOjy34chdfL/pgW0sv7XVdVLAGBzpGyiickoQmiRHkyDNmk8AFX9L+DM6L2J/QoukMI0ioIcGrItlf5w/MG+SzecuctSVC8fFaofrCuUfM5nVJ7RAJksgC2H0x49+A6jrf9QxhtY2ZswQLoQLIlK5HV0kHQIH0e78oEBCsRycaqDeeC2a6qYJvuHPoQRTJwY3XgOrKH1oLazLFIlEQBOb8yUDPtcgX1IJADn8B0t/KjXoHRALTw1XSsL/rB0buvkZi1uVbgP8ICq3tcJvL/ll3KLY05PweSRMKhZWLLpClHlxPXqPR+PkDRQ7JecFRZAHYOPv5vVbxZXo2w/4YyDbfhqUc8y4xgav8K0Zq1qFlRUR9Z+LQwlS3FyBA2gy4noMGzafWgXMf8d5ToTxlgilumFls0wVr4awMFLH5Imv9stGed7Nc1//vMuCEJfFVWhK7buhoaoiU1Hx3wJcr//1HDEC4SgzrRlE3AFc="
# https://gist.github.com/jkcclemens/000456ca646bd502cac0dbddcb8fa307
cache: cargo
before_cache:
- rm -rfv target/debug/incremental/{maturin,build_script_build,common,test}*
- rm -rfv target/debug/.fingerprint/maturin*
- rm -rfv target/debug/build/maturin*
- rm -rfv target/debug/deps/{libmaturin,maturin,test,common}*
- rm -rfv target/debug/{libmaturin,maturin,common,test}*
- cargo clean -p maturin
- rm -rfv target/.rustc_info.json
addons:
apt:
sources:
- deadsnakes
packages:
- libdbus-1-dev
- musl-tools
- fakeroot
- python3.5-dev
- python3.5-venv
- python3.6-dev
- python3.6-venv
- python3.7-dev
- python3.7-venv
matrix:
fast_finish: true
include:
# Test the dockerfile
- name: Docker
os: linux
cache: false
install:
- docker pull konstin2/maturin:master || true
- docker build --cache-from konstin2/maturin:master . -t maturin
script:
- ./test-dockerfile.sh
# These create deployments
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-musl DEPLOY=1
- os: osx
rust: nightly-2019-10-04
env: TARGET=x86_64-apple-darwin DEPLOY=1
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-musl DEPLOY=1
addons:
apt:
sources:
- deadsnakes
packages:
- fakeroot
- python3.5-dev
- python3.6-dev
- python3.6-venv
- python3.7-dev
- libdbus-1-dev:i386
- libgmp-dev:i386
- binutils:i386
# We actually only need musl-tools:i386 and gcc-multilib, but we need the others to get apt to install them
- cpp-4.8:i386
- musl:i386
- musl-tools:i386
- gcc-multilib:i386
- gcc:i386
- cpp:i386
# Those are run all tests
- os: linux
rust: nightly-2019-10-20
env: TARGET=x86_64-unknown-linux-gnu
- os: osx
rust: nightly-2019-10-20
env: TARGET=x86_64-apple-darwin
# Run clippy and rustfmt
- name: stylecheck
os: linux
rust: stable
install:
- rustup component add clippy
- rustup component add rustfmt
script:
- cargo fmt --all -- --check
- cargo clippy -- -D warnings
install:
# Both pyenv and travis are weird; Mac os can't do virtualenv out of venv, linux needs a venv, so this
# is the source of this mess
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
python3 -m pip install cffi virtualenv
fi
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
python3.6 -m venv venv
source venv/bin/activate
pip install cffi virtualenv
fi
script:
- if [[ "$TARGET" == *musl ]]; then rustup target add $TARGET; fi
- |
if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
cargo test --no-default-features --features skip-nightly-tests
else
cargo test --no-default-features
fi
before_deploy: bash ci/before_deploy.sh
deploy:
- # Add zipped binary to the github release
provider: releases
file_glob: true
file:
- $TRAVIS_BUILD_DIR/$BINARY_NAME-$TRAVIS_TAG-$TARGET.*
- $TRAVIS_BUILD_DIR/$BINARY_NAME*.deb
skip_cleanup: true
on: # Create downloads only with stable rust and only for stable releases
condition: $DEPLOY = 1
tags: true
# - Create a `public_repo` GitHub token at https://github.com/settings/tokens/new
# . If you haven't already, install the travis gem: `gem install TRAVIS_TAG`
# - Encrypt it with `travis encrypt 0123456789012345678901234567890123456789`
# - Paste the output down here
api_key:
secure: "bKY3J8FBwgit9inzp2CMxQC3icBVco+COcRnqM6NhaOWX3KefXYG/yWQ7htBkeTRAfQERlOkZZOPsOto2dAD49/Mo4Uin9wbRPjPDGPJpFcQofX5aKHqK1Xd1k96rtZKZRIEG5k5J2IKAzPso3GnA0FESAZlZbxEShSCBD6aOlVmjFXwB2kKzJDo9zECxCg84GSvR/7wQg4hwMaMBa79y3VJRCohGTMaISL22QJ0haG+gqZgTv/r9K8P9lwSMBIiTXX3wFJU871sqUNTSSwkmHlVLhVUOwluv+KQ2DI/V/gWfx2CuiZ/7OQlz4zkOB/Y56msH0G7vOwqbSHLwkMYC+zgDWvF0oI/Eb/mdY5VliQdsLDOkKwWm3EuoEUvCgyV9UB1POxxogIx1sAU+Vt9QUj5/cRIJc1zrtA3LdNlbg9M9rYG8jJ6JMbeYTFDTL6YNoHc2lPAdmAqQAZQy6vyR515vm76JfS7yDcLRXKKhLE4dEPUEpv0qU8vCA/FdaZaiW+GJZSS5rJoE0vHaMRsWkgFLqCNSDpUZBd2x60E+n6dQ7XX4DrJ1JmzcG+IZ6AfuIWyRD9s3jQBxRjtyM61ZGo3Nb4zwX2ML1PftNURNAo8rPlgIrqPaveic45hP6PAeX+iMIWzTckq8shlYngjBTw/3UmA8Z18udrRyKCbygs="
branches:
only:
# Pushes to the master branch
- master
# Match release tags with a regex
- /^v\d+\.\d+\.\d+.*$/