-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (65 loc) · 1.56 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
os: linux
dist: xenial
sudo: false
addons:
apt:
packages:
# Required headers to build against libfuse
- libfuse-dev
# necessary for kcov
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- libiberty-dev
- binutils-dev
- cmake
- gcc
language: rust
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
fast_finish: true
stages:
- name: test
- name: lint
- name: coverage
install:
- which cargo-cache || cargo install cargo-cache
- which cargo-audit || cargo install cargo-audit
before_script:
- mv client_secret.travis.json client_secret.json
# Default script is the "test" stage
script:
- cargo build
- cargo test
before_cache:
- cargo cache --autoclean
jobs:
include:
- stage: lint
rust: stable
install:
- rustup component add clippy
- rustup component add rustfmt
script:
- cargo fmt --all -- --check
- cargo clippy --all-targets --all-features -- -D warnings
- cargo audit
- stage: coverage
if: os = linux
sudo: true
rust: stable
env:
- RUSTFLAGS="-C link-dead-code -C debuginfo=2 -C opt-level=0"
- CACHE_NAME="coverage"
install:
- ./.travis/install-kcov.sh "v36" "29ccdde3bd44f14e0d7c88d709e1e5ff9b448e735538ae45ee08b73c19a2ea0b" && export PATH="kcov/usr/bin:${PATH}";
script:
- cargo test --no-run
- ./.travis/run-kcov.sh "photooxide"
- bash <(curl -s https://codecov.io/bash) -F "${TRAVIS_RUST_VERSION}"
cache: cargo