forked from sharkdp/pastel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (70 loc) · 2.72 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
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
- os: windows
rust: stable
env: TARGET=x86_64-pc-windows-msvc
# Minimum Rust supported channel.
- os: linux
rust: 1.34.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=pastel
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: "GzwsCXXvfMx2H04iXh0pCH3kfyNSPGyu4+RJGwwKX7qxrF5GZo3zqZQyYYlaO0neyPxpZdTT6s0IiHWI9lVdFoaHPvBNi96lAXiNTVa4PGvfina9+7d2kk0UfB1XsEsdsAIcG7OklTxJ1Apl3SUcu9khwwLpeBQ9XW7q1JNPsilYq4u+M8X3rFMRbmRjWkSbbVcT/6+a4LC9DJxdsa0XF2+a191troonmdOHib/Hh2x45IBJP1PUXuPHNse/WeypvgOJP08Wg1JRQW+61K8xnksPA0EShFU9voN+yyC5vkHDU/MM6G//X7IKNWLeShyDfYAFA0hLcE+FRFh9thEC940UGOiKRNugG+gQ4vZNqPxwl9sviAfk2g7szRAAATmOzNCbVSA3n9r7Heg65DT/dESHisgNFZrSIbTl7tGGmjfti0IQJjJhMbQh3cMDVooLdNDSk+vzR4E9jOcpiRVDcGEflM2/DJcJzVMt+qNF3btCQUb4i4U+DpCUkavEtBBJsAst311qmH4aGDd6Z/PTn1oxDtOYBUO9/Vrkx0rQMFSlymgpWrYHOMfzrR053kygktz3ApVDPybiQ6w3aXtfTrMmgEZzv24Y5Cp6zoJPpNC5RPdBI2mfCnTlnMYP661vAGOBF5ot1QVHdJGEo/iZu1bdKiEY8MlhKFNnm73iYAA="
# 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 != "x86_64-pc-windows-msvc"
notifications:
email:
on_success: never