-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
227 lines (218 loc) · 6.83 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
language: rust
cache: cargo
env:
global:
- PROJECT_NAME=mandelbrot-rust-gl
# AFAICT There are a few ways to set up the build jobs. This one is not the DRYest but I feel is the
# easiest to reason about.
# TODO Feel free to remove the channels/targets you don't need
# NOTE Make *sure* you don't remove a reference (&foo) if you are going to dereference it (*foo)
matrix:
include:
# Stable channel
- os: linux
rust: stable
env: TARGET=aarch64-unknown-linux-gnu
# need Trusty because the glibc in Precise is too old and doesn't support 64-bit arm
dist: trusty
sudo: required
# Extra packages only for this job
addons:
apt:
packages: &aarch64_unknown_linux_gnu
# Transparent emulation
- qemu-user-static
- binfmt-support
- os: linux
rust: stable
env: TARGET=armv7-unknown-linux-gnueabihf
# sudo is needed for binfmt_misc, which is needed for transparent user qemu emulation
sudo: required
addons:
apt:
packages: &armv7_unknown_linux_gnueabihf
# Cross compiler and cross compiled C libraries
- gcc-arm-linux-gnueabihf
- libc6-armhf-cross
- libc6-dev-armhf-cross
# Transparent emulation
- qemu-user-static
- binfmt-support
- os: osx
rust: stable
env: TARGET=i686-apple-darwin
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-gnu
addons:
apt:
packages: &i686_unknown_linux_gnu
# Cross compiler and cross compiled C libraries
- gcc-multilib
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-musl
dist: trusty
sudo: required
addons:
apt:
packages: &musl_packages
- musl
- musl-dev
- musl-tools
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-musl
dist: trusty
sudo: required
addons:
apt:
packages: *musl_packages
# Beta channel
- os: linux
rust: beta
env: TARGET=aarch64-unknown-linux-gnu
dist: trusty
sudo: required
addons:
apt:
packages: *aarch64_unknown_linux_gnu
- os: linux
rust: beta
env: TARGET=armv7-unknown-linux-gnueabihf
sudo: required
addons:
apt:
# Use the same packages the stable version uses
packages: *armv7_unknown_linux_gnueabihf
- os: osx
rust: beta
env: TARGET=i686-apple-darwin
- os: linux
rust: beta
env: TARGET=i686-unknown-linux-gnu
addons:
apt:
packages: *i686_unknown_linux_gnu
- os: linux
rust: beta
env: TARGET=i686-unknown-linux-musl
dist: trusty
sudo: required
addons:
apt:
packages: *musl_packages
- os: osx
rust: beta
env: TARGET=x86_64-apple-darwin
- os: linux
rust: beta
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: beta
env: TARGET=x86_64-unknown-linux-musl
dist: trusty
sudo: required
addons:
apt:
packages: *musl_packages
# Nightly channel
- os: linux
rust: nightly
env: TARGET=aarch64-unknown-linux-gnu
dist: trusty
sudo: required
addons:
apt:
packages: *aarch64_unknown_linux_gnu
- os: linux
rust: nightly
env: TARGET=armv7-unknown-linux-gnueabihf
sudo: required
addons:
apt:
# Use the same packages the stable version uses
packages: *armv7_unknown_linux_gnueabihf
- os: osx
rust: nightly
env: TARGET=i686-apple-darwin
- os: linux
rust: nightly
env: TARGET=i686-unknown-linux-gnu
addons:
apt:
packages: *i686_unknown_linux_gnu
- os: linux
rust: nightly
env: TARGET=i686-unknown-linux-musl
dist: trusty
sudo: required
addons:
apt:
packages: *musl_packages
- os: osx
rust: nightly
env: TARGET=x86_64-apple-darwin
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-musl
dist: trusty
sudo: required
addons:
apt:
packages: *musl_packages
allow_failures:
# TODO You might need to allow failures for some target on some channel for some reason. Below
# there's one (commented out) example of how to do that. Just change the OS, channel and TARGET
# as needed.
# - os: linux
# rust: stable
# env: TARGET=x86_64-unknown-linux-gnu
before_install:
- export PATH="$PATH:$HOME/.cargo/bin"
install:
- bash ci/install.sh
script:
- bash ci/script.sh
before_deploy:
- bash ci/before_deploy.sh
deploy:
provider: releases
# TODO Regenerate this api_key for your project, this one won't work for you. Here's how:
# - 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: "IV4baZnYBe9g/CRDRCnkVCun8ZAk3aBFqGGb+6f6/Lfv3rRyimeqjABuJwq9dtoT3qEmvK8bCbI8cHKjn/K/0M0WFfELnoqqmeDBRFZUNGFGXYkUNjDUJG289fPlMMYgjvO1QYL6XPL8Q6IHH0dX+od0fZDOmOstIubEULqrs91Haa37sB16vFYpQ3gZw/PBLzc7qyXh/Oa6H6nX68c8p9tBRAzPoHVpjlqoh3vK9yVZ1w+jOmHDrUyuaJiT9QAy7EA2vYSNjoHHrCGB41WnfLcBZE7DFTh5S44MvuLIJjGvkgTDynNF1VlQQp1JCMihJ/gzW9d2EQjVchXWbP/ojL7kNgcn5EQjuCSwKaiWpuHEy5996D0yU82O5PoEY6jzhwvHxOSs4jLSwchQb+9B/yQHdlKsGRvHmge29M60iOrRugkQrWPcB4tvsp0onTmmDJYfIkcghSgLaIaB0xTefLGcBt71PQntBsKlPaeNe+AVktgjX0g+ncg2P9pWNNgfJ2pJsW2ADQtMdyuIKaIUlZCNNletCCTfoWpaTb6PFDZARlV13lcN01g5aM3B1OrS0lp7WN2Fzy6zejPW8M/zAn0ZJ0ajgU9ng3fyN5HR0tBww0TNhI2Uyyy/bB9quk2/r5a9wk6igJcRkFpq5ANCDcCnjEUjfYxWnpCwD1TwzzM="
file_glob: true
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.*
# don't delete the artifacts from previous phases
skip_cleanup: true
# deploy when a new tag is pushed
on:
# channel to use to produce the release artifacts
# NOTE make sure you only release *once* per target
# TODO you may want to pick a different channel
condition: $TRAVIS_RUST_VERSION = stable
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