forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
161 lines (147 loc) · 4.73 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
150
151
152
153
154
155
156
157
158
159
160
161
language: rust
rust: stable
sudo: required
dist: trusty
os: linux
services:
- docker
git:
depth: 1
matrix:
include:
# stable linux builds, tested
- env: TARGET=x86_64-unknown-linux-gnu
ALT=i686-unknown-linux-gnu
IMAGE=dist
MAKE_TARGETS="test distcheck doc install uninstall"
ALLOW_PR=1
- env: TARGET=i686-unknown-linux-gnu
IMAGE=dist
MAKE_TARGETS=test-unit-i686-unknown-linux-gnu
CFG_DISABLE_CROSS_TESTS=1
# stable osx builds, tested
- env: TARGET=x86_64-apple-darwin
ALT=i686-apple-darwin
MAKE_TARGETS="test distcheck doc install uninstall"
MACOSX_DEPLOYMENT_TARGET=10.7
os: osx
- env: TARGET=i686-apple-darwin
MAKE_TARGETS=test-unit-i686-apple-darwin
MACOSX_DEPLOYMENT_TARGET=10.7
CFG_DISABLE_CROSS_TESTS=1
os: osx
# stable musl target, tested
- env: TARGET=x86_64-unknown-linux-musl
IMAGE=x86_64-musl
CFG_DISABLE_CROSS_TESTS=1
MAKE_TARGETS=test-unit-$TARGET
# cross compiled targets
- env: TARGET=arm-unknown-linux-gnueabi
IMAGE=cross
- env: TARGET=arm-unknown-linux-gnueabihf
IMAGE=cross
- env: TARGET=armv7-unknown-linux-gnueabihf
IMAGE=cross
- env: TARGET=aarch64-unknown-linux-gnu
IMAGE=cross
- env: TARGET=i686-unknown-freebsd
IMAGE=cross
- env: TARGET=x86_64-unknown-freebsd
IMAGE=cross
- env: TARGET=x86_64-unknown-netbsd
IMAGE=cross
- env: TARGET=mips-unknown-linux-gnu
IMAGE=cross
- env: TARGET=mipsel-unknown-linux-gnu
IMAGE=cross
- env: TARGET=mips64-unknown-linux-gnuabi64
IMAGE=cross
rust: beta
- env: TARGET=mips64el-unknown-linux-gnuabi64
IMAGE=cross
rust: beta
- env: TARGET=s390x-unknown-linux-gnu
IMAGE=cross
rust: beta
- env: TARGET=powerpc-unknown-linux-gnu
IMAGE=cross
rust: beta
- env: TARGET=powerpc64-unknown-linux-gnu
IMAGE=cross
rust: beta
- env: TARGET=powerpc64le-unknown-linux-gnu
IMAGE=cross
rust: beta
# beta/nightly builds
- env: TARGET=x86_64-unknown-linux-gnu
ALT=i686-unknown-linux-gnu
IMAGE=dist
MAKE_TARGETS="test distcheck doc install uninstall"
DEPLOY=0
rust: beta
- env: TARGET=x86_64-unknown-linux-gnu
ALT=i686-unknown-linux-gnu
IMAGE=dist
MAKE_TARGETS="test distcheck doc install uninstall"
DEPLOY=0
rust: nightly
exclude:
- rust: stable
before_script:
- curl https://static.rust-lang.org/rustup.sh |
sh -s -- --add-target=$TARGET --disable-sudo -y --prefix=`rustc --print sysroot`
- if [ ! -z "$ALT" ]; then
curl https://static.rust-lang.org/rustup.sh |
sh -s -- --add-target=$ALT --disable-sudo -y --prefix=`rustc --print sysroot`;
fi
script:
- >
if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo skipping, not a full build;
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
SRC=. src/ci/run.sh $TARGET;
else
src/ci/docker/run.sh $IMAGE $TARGET;
fi
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
[ $(uname -s) = Linux ] &&
pip install ghp-import --user &&
$HOME/.local/bin/ghp-import -n target/doc &&
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages 2>&1 > /dev/null
env:
global:
- DEPLOY=1
- secure: "hWheSLilMM4DXChfSy2XsDlLw338X2o+fw8bE590xxU2TzngFW8GUfq7lGfZEp/l4SNNIS6ROU/igyttCZtxZMANZ4aMQZR5E8Fp4yPOyE1pZLDH/LdQVXnROsfburQJeq+GIYIbZ01Abzh5ClpgLg5KX0H627uj063zZ7Ljo/w="
notifications:
email:
on_success: never
before_deploy:
- mkdir -p deploy/$TRAVIS_COMMIT
- cp target/$TARGET/release/dist/cargo-*-$TARGET.tar.gz
deploy/$TRAVIS_COMMIT
- >
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
find "deploy/$TRAVIS_COMMIT" -maxdepth 1 -type f -exec sh -c 'shasum -a 256 -b "{}" > "{}.sha256"' \;;
else
find "deploy/$TRAVIS_COMMIT" -maxdepth 1 -type f -exec sh -c 'sha256sum -b "{}" > "{}.sha256"' \;;
fi
deploy:
- provider: s3
bucket: rust-lang-ci
skip_cleanup: true
local_dir: deploy
upload_dir: cargo-builds
acl: public_read
region: us-east-1
access_key_id: AKIAIWZDM2B2IJOWBGTA
secret_access_key:
secure: NB9b/MhIDiv8OtNiN/sHaFgA3xG2fa7MGuQQKJNj80ktvgByzDm5UPNyNeoYx9SmJ3jOWobgcPVaoUd2S+6XgO3bMBqm7sM/oMeE0KdqToh6+V2bKfyRF2U5fm697LEGepPIBYqMLDg4nr/dbknbKltzp6dAfJRyy22Nb721zPQ=
on:
branch: auto-cargo
condition: $DEPLOY = 1
cache:
directories:
- $HOME/.cargo
- target/openssl