-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
92 lines (81 loc) · 2.91 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
language: rust
cache: cargo
matrix:
allow_failures:
- rust: nightly
include:
# Stable channel.
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-musl
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
# Beta channel.
- os: linux
rust: beta
env: TARGET=x86_64-unknown-linux-gnu
# Nightly channel.
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-gnu
addons:
apt:
packages:
# needed for linux-musl target
- musl-tools
env:
global:
# Default target on travis-ci.
# Used as conditional check in the install stage
- HOST=x86_64-unknown-linux-gnu
# Used on the deployment script
- PROJECT_NAME=eakio
install:
# prevent target re-add error from rustup
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
script:
# Incorporate TARGET env var to the build and test process
- cargo build --target $TARGET --verbose
- cargo test --target $TARGET --verbose
before_deploy:
- bash tools/before_deploy.sh
deploy:
provider: releases
# NOTE updating the `api_key.secure`
# - go to: https://github.com/settings/tokens/new
# - generate new token using `public_repo` scope
# - encrypt it using: `travis encrypt API_KEY_HERE`
# - paste the output below
api_key:
secure: "p3pdxh8i8aUahPAKwWen81LO1Ryn1Vo8wqVYxsFByLkmczSmPmreD1DMDBjnPSx6m/Gz9hGXZ1XNervDse7OL/aqof3Pg1phpPo7iLdMKl4CNecttY78PnUChkqylnro/mAnhxJYj0IV6UPZZ9wWzhCeazEC8UPpxYblq/RxUMkcEJE3D4+FXz6JvKYk1T9OprPt7E7fEBxd5uayOWcb3YEYqle82dQWhSta5G/YxuAo1t5HOsAH5rKmVsEn+iJc1xD28fSOg+aYwZaHk0VoCsHV0/5i6X6apAvGoP4Y2/JWb+6XaqX9naXJY+/bq/+3JXLSz61MmAUH38SkybxlrziLrQbadOXuJLcrNqlGhdpmOSmvEl0xo+QcyTlKo9yddscDOM1sLJOssywT/+8UEvMrw3FZ+eCb2BU4tPCcOZrNl3/lSvlA0DB8HRK/N+9YMGoGlePeXfqIFUnguunDPHz7J5/L2X3/tEg5ZKhCkOcItt/a1EgsFcpz3Y52KocgfCAt8OW3c/LVeAp1pPZpwHcEFmXl9JMK2i6XwXnDDNJrHO0DSLxhBeehnIdD3b0twiAH++x1EsK1hQeQnpDoltjkO3ycrt0eG87uVb8Tm8szdor+2Hv1Rv205W4x/5U3cVNfvKi+iE/loKiPCVWpx/YTgJ8sFPMxD8JLTi01BdM="
# for uploading multiple files
file_glob: true
# NOTE explanation on each env variable
# - PROJECT_NAME: name of the project, set on the `env.global` above
# - TRAVIS_TAG: tag name that the build is being deployed for, usually the version number
# - TARGET: target triple of the build
file:
- $PROJECT_NAME-$TRAVIS_TAG-$TARGET
# don't delete artifacts from previous stage
skip_cleanup: true
on:
# deploy only if we push a tag
tags: true
# deploy only on stable channel that has TARGET env variable sets
condition: $TRAVIS_RUST_VERSION = stable && $TARGET != ""
notifications:
email:
on_success: never
branches:
only:
- develop
# This regex matches semantic versions like v1.2.3-rc4+2016.02.22
- /^v\d+\.\d+.*$/
notifications:
email:
on_success: change
on_failure: always