forked from dandavison/delta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
88 lines (78 loc) · 2.92 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
language: rust
matrix:
include:
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
- os: windows
rust: stable
env: TARGET=x86_64-pc-windows-gnu
- os: linux
rust: stable
env:
- TARGET=x86_64-unknown-linux-musl
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-gnu
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
- os: linux
rust: stable
env:
- TARGET=arm-unknown-linux-gnueabihf
- CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8
- CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
sudo: required
before_install:
- ci/before_install.sh
env:
global:
# Default target on travis-ci.
# Used as conditional check in the install stage
- HOST=x86_64-unknown-linux-gnu
# Used in before_deploy.sh
- PROJECT_NAME=delta
- PACKAGE_NAME=git-delta
install:
# prevent target re-add error from rustup
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
script:
- ci/script.sh
before_deploy:
- bash ci/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: "HLd8A4j/Z+4jrTZmzRAMX+Ko7igvARr0kO1YBQ9goB3m+RLtt77adaZUXrQI6EMHxohSjmtcOsX2HmWBH0hZPk39q8fRmHxIgvzqFM/DmQFIPmmlxgPgOeImJApy9hPxLDJoy1aAtpOEA1Ra33bA98W7CQ+WH9qF3qgTz08+ucq+mdTwV7pA+7bYLNRSzbU+sofPfZxMs97Lvv+c/n7gPJwA6eFrP/I97vux6RU1+RqyJ/Sg8hA19EEaAvLu4oYijuKFR2W6s/k4ODnDIUdF59dgROs7vccMLYNFmx4ECFAhzPtO18htJpyvmWHfRfByw/yFkLAalQIhGxoyILNEeaFSq1pJGRJllGNtmoqeXZctJcbWxt0N7/30PBrzjashxCzpvvjhpzJ9EYu2VBRme7RtLsSRE+R3NVpz4NfmJHEJWnE32Ds+saFJ7ixUcKk6xFG2rJ7/F9vG7x2LluJghDwMky50Glvi79YccrgudmKNY7bAJMVkffgG8r0FlR7HZ2piPa+mEHWGnnVRpWWm0aTQZFYR7GEsPl10LIsjRoVEwUdHVjDA+NiuH3my4FGdu8BKj8JDpEEQrvT1bPkX+M6mfbkr76YoL7GyCx86jLNt1B1uCjUzQW1166YHL11U+UIsrw2RKcYftCzyON4wxelkjafynlI1MOM6XffWKJs="
# 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.*
- $PACKAGE_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
# Caching
cache:
directories:
- /home/travis/.cargo
before_cache:
- rm -rf /home/travis/.cargo/registry