language: rust
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: 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