blob: 0e088791d27aaa4429636a0cb5c3b2a07255050a (
plain)
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
|
language: rust
cache: cargo
matrix:
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
# Minimum Rust supported channel.
- os: linux
rust: 1.29.0
env: TARGET=x86_64-unknown-linux-gnu
addons:
apt:
packages:
# needed to build deb packages
- fakeroot
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=diskus
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 ci/before_deploy.bash
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: "eibfoNCoqJEXfOpaCrQHMPSpmmThPitZB0nTWp0B8F5n29XmiMVpRDFz6LkbWt9xosyhlDK0coes+lJ/b4JIV7JVOJ3jhXNynhElVp0nHvhSN3CCzBk65nJjRPCsmyVjKn/Nj7fIwQJJrCxiAOdq+0DZPpl+Ix5GArXYJ3CLxLE/gwnHOkTqgrG612YmQQP68Cu9MsasRJt9SPxxGUsnNdPyfezxTQwu0BwWHzL/J3fa/e2HWFuFx6tD69fqF6k3Yt3i2fXasX1wDGvKLz36ttjsgqGYTAHf5nUFkz4l0O/bSRcrsqxxRjS1UGGa2PFvpPQE6OiV9szJSPEd2wP9OedbcTKybmmYpOHXJV4KpoLsY88aBtuLfMHkE6TfK67Otvp1lw59XHXHB4W3L1fEgB1TP3LW3AjAXlP9buE/a0pxrc85Z9oHasD3s4SgH5mMiaAXwZEiR5GWM1TWc3+hPOQH4K/TCZfM5qkFLcDMBtxfkanx6Yts4EKojA6T0O8Gh27AAYW/0mEdOjNnoOY6A8jengluZBrAxdW+hekgVMMHXFtXG2JohAQpEgYYKX1TOybslipeMzXDysdmouxjRK3Bi4ccjVDkSjfg020x8JVQCg7UQBfu6V2m/8Y0dfmczVmDOJkcwFnPaK/OQ9uub/bwLaa41G0Fjcxc+/FVb8c="
# 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.*
- $PROJECT_NAME*.deb
# 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
|