forked from image-rs/image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
121 lines (121 loc) · 3.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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
language: rust
dist: focal
sudo: false
notifications:
webhooks:
if: fork = false
urls:
- https://webhooks.gitter.im/e/816755464e93a0defff0
on_success: change
on_failure: always
on_start: never
os:
- linux
rust:
- 1.34.2
- stable
- beta
- nightly
env:
global:
- secure: "WI/r7hbDhenb7zPXht8J0mhcx5aUgY22cCrwYmNksMmgIK9hYfPjZ68XzaQ7+Ity8b12TlHM8lGRN9bIsyAZEiRIkxkZAArY9bXAOExJaAT+yOyxhEs/QdrGB6iRhC6FTxPwgUH82j0nFL1UI7HqBnOy3g3tv23jq1AlD9N3t0k="
matrix:
- DEFAULT_FEATURES='yes'
- FEATURES=''
- FEATURES='gif'
- FEATURES='jpeg'
- FEATURES='png'
- FEATURES='pnm'
- FEATURES='tga'
- FEATURES='dds'
- FEATURES='tiff'
- FEATURES='webp'
- FEATURES='hdr'
- FEATURES='farbfeld'
matrix:
allow_failures:
- name: "Clippy"
- name: "Public private dependencies"
- name: "Fuzz corpus"
- rust: nightly
include:
- os: linux
rust: stable
env: FEATURES='ravif'
before_install:
- sudo apt-get update &&
sudo apt-get -y install nasm;
script:
- cargo test -v --no-default-features --features "$FEATURES" &&
cargo doc -v --no-default-features --features "$FEATURES";
- os: osx
rust: 1.34.2
- os: windows
rust: 1.34.2
- os: osx
rust: stable
- os: windows
rust: stable
- os: osx
rust: nightly
- os: windows
rust: nightly
- os: linux
rust: nightly
name: "Internal benchmarks"
env: BENCHMARKS='yes'
- os: linux
rust: stable
name: "Clippy"
script:
- rustup component add clippy
- cargo clippy
- os: linux
rust: stable
name: "Fuzz targets (afl)"
script:
- cargo install afl
- cd fuzz-afl
- cargo check --bin reproduce_webp
- cargo check --bin reproduce_pnm
- cargo afl check --bin fuzz_webp
- cargo afl check --bin fuzz_pnm
- os: linux
rust: nightly
name: "Fuzz targets (cargo-fuzz)"
script:
- cargo install cargo-fuzz
- cargo fuzz build
- os: linux
rust: nightly
name: "Fuzz corpus"
script:
- cargo install cargo-fuzz
- cargo fuzz build
- for format in $(cargo fuzz list); do
cargo fuzz run "$format" -- -runs=0;
done
- os: linux
rust: nightly
name: "Public private dependencies"
script:
- mv ./Cargo.toml.public-private-dependencies ./Cargo.toml
- echo "#![deny(exported_private_dependencies)]" | cat - src/lib.rs > src/lib.rs.0
- mv src/lib.rs.0 src/lib.rs
- cargo check
script:
- if [ -n "${FEATURES+exists}" ]; then
cargo build -v --no-default-features --features "$FEATURES" &&
if [[ "$(cargo --version)" != "cargo 1.34"* ]]; then
cargo test -v --no-default-features --features "$FEATURES" &&
cargo doc -v --no-default-features --features "$FEATURES";
fi
fi
- if [ -n "${DEFAULT_FEATURES+exists}" ]; then
if [[ "$(cargo --version)" != "cargo 1.34"* ]]; then
cargo test -v;
fi
fi
- if [ -n "${BENCHMARKS+exists}" ]; then
cargo build -v --benches --features=benchmarks;
fi