-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
134 lines (123 loc) · 3.69 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
sudo: false
language: rust
cache: cargo
env:
global:
# this will be part of the release tarball
- PROJECT_NAME=colonize
- RUST_BACKTRACE=1
# override the default '--features unstable' used for the nightly branch
- TRAVIS_CARGO_NIGHTLY_FEATURE="nightly-testing"
# encrypted Github token for doc upload
- secure: "OtcCEFBniy4i89KaFKEOct+JsTQF3W3+6SYWlcB4FEvljRwwpAMWzpqoHQhfNLPQiX07Da+IlKrhM5wt2PPF80dEzyIxiK6Y/fJFgd0peAkbKYwqrgoS80WoqSHYBR8STb+X6JlhxxX+/pma+ILBBFQ6UH01KEHGISlHq4ARw58="
# the following are necessary for `travis-cargo coveralls --no-sudo`
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev # optional: only required for the --verify flag of coveralls
matrix:
fast_finish: true
allow_failures:
- rust: nightly
include:
# stable channel
- 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
# freetype library
- libfreetype6-dev:i386
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
# beta channel
- 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=x86_64-unknown-linux-gnu
# nightly channel
- 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=x86_64-unknown-linux-gnu
before_install:
- |
export PATH="$PATH:$HOME/.cargo/bin"
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update &&
brew install freetype
fi
install:
- bash ci/install.sh
before_script:
# load travis-cargo
- |
pip install 'travis-cargo<0.2' --user &&
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export PATH=$HOME/.local/bin/:$PATH
else
export PATH=$HOME/Library/Python/2.7/bin:$PATH
fi
# the main build
script:
- bash ci/script.sh
after_success:
# upload the documentation from the build with stable (automatically only
# actually runs from the master branch, not individual PRs)
- travis-cargo --only stable doc-upload
# measure code coverage and upload to coveralls.io (the verify argument
# mitigates kcov crashes due to malformed debuginfo, at the cost of some
# speed. <https://github.com/huonw/travis-cargo/issues/12>)
- travis-cargo coveralls --no-sudo --verify
before_deploy:
- bash ci/before_deploy.sh
deploy:
provider: releases
api_key:
# secure Github token for release upload
secure: "GYMxoVSW+/8JCDgfC+YD8Yl1j5BVyKmCZ8d8gqCoz6XP0xfR3p42U8Dkh8qZexDESVHFUQpemsilOw/wWTN47fP4x/OcQLzyU1L9jH2GtfjKVw/HxMOUU1W8URVikTdlvpHvwAskwB9YMsy9tnigzJNKqr9iXxISiXZr9fiKmeE="
file_glob: true
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.*
# don't delete the artifacts from previous phases
skip_cleanup: true
on:
# channel to use to produce the release artifacts
condition: $TRAVIS_RUST_VERSION = stable
tags: true
branches:
only:
- master
- auto
# Ruby regex to match tags. Required to 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