libwebp 0.1.2

A binding to libwebp
Documentation
language: rust
dist: bionic

matrix:
  include:
  - rust: stable
    env: WEBP_VERSION=0.4.4
  - rust: stable
    env: WEBP_VERSION=0.5.2
  - rust: stable
    env: WEBP_VERSION=0.6.1 WEBP_FROM_DISTR=true
  - rust: stable
    env: WEBP_VERSION=1.0.3
  - rust: stable
    env: WEBP_VERSION=1.1.0
  - rust: stable
    env: WEBP_VERSION=1.1.0 WEBP_BUNDLED=true
  - rust: 1.31.0
    env: WEBP_VERSION=1.1.0
  - rust: beta
    env: WEBP_VERSION=1.1.0
  - rust: nightly
    env: WEBP_VERSION=1.1.0
  - rust: nightly
    env: WEBP_VERSION=1.1.0 COMMON_FEATURES=extern-types,

install:
- if [[ $TRAVIS_RUST_VERSION = stable ]]; then rustup component add rustfmt clippy; fi
- if [[ $WEBP_FROM_DISTR = true ]]; then
  sudo apt update && sudo apt install libwebp-dev -y;
  fi
- >
  if [[ $WEBP_BUNDLED != true && WEBP_FROM_DISTR != true ]]; then
  wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBP_VERSION.tar.gz &&
  tar zxf libwebp-$WEBP_VERSION.tar.gz &&
  cd libwebp-$WEBP_VERSION &&
  ./configure --enable-libwebpmux --enable-libwebpdemux && make && sudo make install;
  fi
- if [[ $WEBP_BUNDLED != true ]]; then
  export __LIBWEBP_SYS_FORBID_BUILD=1;
  fi
- export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
- export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
script:
- cargo test --all --features "${COMMON_FEATURES}"
- cargo test --all --features "${COMMON_FEATURES}demux,"
- cargo test --all --features "${COMMON_FEATURES}mux"
- cargo test --all --features "${COMMON_FEATURES}demux,mux"
- if [[ ! $WEBP_VERSION < 0.5 ]]; then cargo test --all --features "${COMMON_FEATURES}0_5"; fi
- if [[ ! $WEBP_VERSION < 0.5 ]]; then cargo test --all --features "${COMMON_FEATURES}0_5,demux"; fi
- if [[ ! $WEBP_VERSION < 0.5 ]]; then cargo test --all --features "${COMMON_FEATURES}0_5,mux"; fi
- if [[ ! $WEBP_VERSION < 0.5 ]]; then cargo test --all --features "${COMMON_FEATURES}0_5,demux,mux"; fi
- if [[ ! $WEBP_VERSION < 0.6 ]]; then cargo test --all --features "${COMMON_FEATURES}0_6"; fi
- if [[ ! $WEBP_VERSION < 0.6 ]]; then cargo test --all --features "${COMMON_FEATURES}0_6,demux"; fi
- if [[ ! $WEBP_VERSION < 0.6 ]]; then cargo test --all --features "${COMMON_FEATURES}0_6,mux"; fi
- if [[ ! $WEBP_VERSION < 0.6 ]]; then cargo test --all --features "${COMMON_FEATURES}0_6,demux,mux"; fi
- if [[ ! $WEBP_VERSION < 1.1 ]]; then cargo test --all --features "${COMMON_FEATURES}1_1"; fi
- if [[ ! $WEBP_VERSION < 1.1 ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,demux"; fi
- if [[ ! $WEBP_VERSION < 1.1 ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,mux"; fi
- if [[ ! $WEBP_VERSION < 1.1 ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,demux,mux"; fi
- if [[ $WEBP_BUNDLED = true ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,static"; fi
- if [[ $WEBP_BUNDLED = true ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,static,demux"; fi
- if [[ $WEBP_BUNDLED = true ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,static,mux"; fi
- if [[ $WEBP_BUNDLED = true ]]; then cargo test --all --features "${COMMON_FEATURES}1_1,static,demux,mux"; fi
- if [[ $TRAVIS_RUST_VERSION = nightly ]]; then cargo doc --all --features "${COMMON_FEATURES}__doc_cfg"; fi
- if [[ $TRAVIS_RUST_VERSION = stable ]]; then cargo fmt --all -- --check; fi