-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
49 lines (44 loc) · 1.18 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
dist: xenial
language: shell
git:
depth: 1
quiet: true
cache:
directories:
- "$HOME/.cargo"
- target
before_cache:
- |
cargo install \
--debug \
--force \
--git https://github.com/matthiaskrgr/cargo-cache \
--no-default-features \
--features ci-autoclean \
--bin cargo-cache \
-- \
cargo-cache
- cargo cache
- find ~/.cargo/bin ! -type d -exec strip {} \;
matrix:
fast_finish: true
include:
- os: linux
- os: osx
- os: windows
- name: rustfmt
install:
- rustup component add rustfmt
script:
- cargo fmt -- --check;
before_install:
- curl -sSf https://build.travis-ci.com/files/rustup-init.sh | sh -s -- -y --default-toolchain=stable --profile=minimal
- export PATH="$HOME/.cargo/bin:$PATH"
- export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
script:
- cargo build
- if [ -n "$GITHUB_TOKEN" ]; then FEATURES=('--github-token' "$GITHUB_TOKEN"); else FEATURES=(); fi
- RUST_COMMIT=$(git ls-remote https://github.com/rust-lang/rust master | awk '{print $1}')
- cargo run -- "${FEATURES[@]}"
- rustc +"$RUST_COMMIT" -vV
- rustc +"$RUST_COMMIT" -vV | grep "$RUST_COMMIT"