-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
92 lines (76 loc) · 2.83 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
env:
global:
- CRATE_NAME=bef93
matrix:
include:
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: stable
before_script:
- sudo apt-get update
- sudo apt-get install -y gcc-4.8 cpp-4.8 gcc-multilib
env: TARGET=i686-unknown-linux-gnu
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
- os: windows
rust: stable
env: TARGET=x86_64-pc-windows-msvc
- os: windows
rust: stable
env: TARGET=i686-pc-windows-msvc
- os: linux
rust: 1.41.0
script: cargo test --release
- name: "clippy"
os: linux
rust: stable
script:
- rustup component add clippy
- cargo clippy
- name: "rustfmt"
os: linux
rust: stable
script:
- rustup component add rustfmt
- cargo fmt --all -- --check
- os: linux
rust: beta
script: cargo test --release
- os: linux
rust: nightly
script: cargo test --release
allow_failures:
- rust: nightly
- rust: beta
fast_finish: true
script:
- rustup target install $TARGET
- cargo test --release --target=$TARGET
before_deploy:
- cargo build --release --target=$TARGET
- mkdir $CRATE_NAME-$TRAVIS_TAG-$TARGET
- cp ./{README.md,LICENSE} $CRATE_NAME-$TRAVIS_TAG-$TARGET
- |
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
cp target/$TARGET/release/$CRATE_NAME.exe $CRATE_NAME-$TRAVIS_TAG-$TARGET
else
cp target/$TARGET/release/$CRATE_NAME $CRATE_NAME-$TRAVIS_TAG-$TARGET
fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then tar czf $CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz $CRATE_NAME-$TRAVIS_TAG-$TARGET; fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then zip -r $CRATE_NAME-$TRAVIS_TAG-$TARGET.zip $CRATE_NAME-$TRAVIS_TAG-$TARGET; fi
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then 7z a -tzip $CRATE_NAME-$TRAVIS_TAG-$TARGET.zip $CRATE_NAME-$TRAVIS_TAG-$TARGET; fi
deploy:
provider: releases
api_key:
secure: "oLbHYn1tmiG05m9ayx7fbDDmdZLh9P8/ZtNjrQJIeDXfI73fn5Ot29HTuZ0qiBvaCZzpgSw8GyA5IJtye49Ho90cYm81foZzC91Dkxt+ajyXffXW4OSMeiCOHlFp4OVEXDLMPlsUOWRlqgv6DzXSzufFXWrh/Ih1Yf8Jff6mewVjZtfRfgvX0hf+J3P2WNpdtFutdm2AnY1jInOK9AarpfTRZYX5SFSYec16Rkimyz8Ns9dlfjtlNk7nzhjrjl0MtNVbL6vCG0O4jI4ZKP/KW4gt2F7BDh7nkrgDs0NxVpzCDL8M8Ikw6VZ+8MWku3Ugvq4E34WVj9QojlSe6tbRoIcaUi1MoVz1cjymiJ7t9y+kjEZyiJfRk3q7Vny6SlZd7f/Gs5flXrQwc9bzFXJru7/RYn0XqSxuz9C21UzYw1rCzhjHfPIOnsNyDNM+5pfuy8ny3kJInsQVEtOVwNanzcdPDCXf5A3tkZohkFwFaFKQf3MSP10UHjpoMHtMEetrZHrxvta/VqAg2y19uEk0Brg7l/WLXb4XAM1uTn7s4Uug3jiTsM0haPUYpS/W3DaFDZ7IchFQVIVRtckWX02q8hQlxBq5f/K/bWiDGeKhcyWkVXPB9VoDF///mMbi1N1UBo0DL446hYGBDxpjYC4ASOq6olmakLAFYFk91iCItIY="
skip_cleanup: true
file_glob: true
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*
on:
tags: true
condition: $TRAVIS_RUST_VERSION = stable