forked from benfred/py-spy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (81 loc) · 3.42 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
language: rust
sudo: required
dist: xenial
matrix:
include:
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-musl
- env: TARGET=armv7-unknown-linux-gnueabihf
- env: TARGET=x86_64-apple-darwin
os: osx
before_install:
- |
rustup target add $TARGET
if [ $TARGET = x86_64-unknown-linux-musl ]; then
sudo apt-get install musl-tools
# download libunwind and build a static version w/ musl-gcc
wget https://github.com/libunwind/libunwind/releases/download/v1.3.1/libunwind-1.3.1.tar.gz
tar -zxvf libunwind-1.3.1.tar.gz
cd libunwind-1.3.1/
CC=musl-gcc ./configure --disable-minidebuginfo --enable-ptrace --disable-tests --disable-documentation
make
sudo make install
cd ..
elif [ $TARGET = x86_64-unknown-linux-gnu ]; then
sudo apt-get install libunwind-dev
elif [ $TARGET = armv7-unknown-linux-gnueabihf ]; then
sudo apt-get install gcc-arm-linux-gnueabihf gcc-5-multilib-arm-linux-gnueabihf libc-dev-armhf-cross
elif [ $TARGET = i686-unknown-linux-gnu ]; then
sudo apt-get install gcc-multilib
fi
script:
- |
if [ $TARGET = armv7-unknown-linux-gnueabihf ]; then
# we can't run the unittest w/ ARM so just test that we can compile
cargo build --verbose --target $TARGET
elif [ $TARGET = i686-unknown-linux-gnu ]; then
# doesn't seem like the integration tests work with i686 (building a 32bit version
# then using to profile a 64bit pythhon issus?). Just test we can compile
cargo build --verbose --target $TARGET
else
cargo test --verbose --target $TARGET
fi
# Adapted from rust-everwhere:
# https://github.com/japaric/rust-everywhere
before_deploy:
- bash ci/before_deploy.sh
deploy:
provider: releases
# To generate key:
# - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the
# `public_repo` scope enabled
# - Call `travis encrypt $github_token` where $github_token is the token you got in the previous
# step and `travis` is the official Travis CI gem (see https://rubygems.org/gems/travis/)
# - Enter the "encrypted value" below
api_key:
secure: "WmCbF+TpyKjOcEBBdcitRth6mb/lRlJQvr0kfKWzX0Ttng+mXWwuqU+9or670/P2Ku9J5OZF9LEsQc0z2j7mz5qnwFicrJkczLg3JJ72ttS3h06iAbhb8L4mFoITmOjptVVYKeOqcDnM2MoyNTbiR8XSsaLm+cdIOilYbimVqzyrs1FszOetlOO6aFnJWHuJTYK7Tk+6KOOsMopd2zBKwh8EALPC9o6MuDXYJ5CJUNcWTZrkPuK0pbskBrj3D1ygpW65FZln3xs0FCSaUrlqohKkChY0132SN0X1DY+hNkqgDEC2R7DqiCTxnVnEpiBx+jfB26atuPIpc/CrhzbNddu7j36vzY6E85EUEjM9UC6Hc9N0j7pXBsiiZbLP2Xvr9pe2YFOkGZq9hg8gMuWH8/VwtdoXRQVPce51xgSAZPNTQUnFDDgbkne/V5FokNQggdHusP8TuU39ojWTgDXp0oMJUtLdk4CSNve5FE22IvesQ5UWVKERfLBZcOejeiramE37d9ReCW21i3AHPVrinbHf8fUjrKXpe0kM+0E3Yci6NM82pXulUQ4VE3tG1toPuuceXoNGmTIytstKH5I2e2UK/jeUsu5RBbJnV0AHmw/1J2aax7sYL1uF1q7d0Uft7MGoih0afy3o6exT9beMPDcjd4yoqAkwZt840mpqP7o="
file_glob: true
file: py-spy-${TRAVIS_TAG}-${TARGET}.*
# don't delete the artifacts from previous phases
skip_cleanup: true
# deploy when a new tag is pushed
on:
tags: true
branches:
only:
# Pushes and PR to the master branch
- master
# IMPORTANT Ruby regex to match tags. Required, or travis won't trigger deploys when a new tag
# is pushed. This regex matches semantic versions like v1.2.3-rc4+2016.02.22
- /^v\d+\.\d+\.\d+.*$/
notifications:
email:
on_success: never
addons:
apt:
packages:
- python3
homebrew:
packages:
- python