pathfinding 1.0.4

Pathfinding, flow, and graph algorithms
Documentation
language: rust

branches:
  only:
    - staging
    - trying

matrix:
  include:
    - rust: nightly
      env: CHECK_FMT=y
    - rust: stable
    - rust: beta
    - rust: nightly
      env: NIGHTLY=y
    - rust: nightly
      env: MINIMAL=y NIGHTLY=y
    - rust: nightly
      env: CHECK_CLIPPY=y
  allow_failures:
    - rust: nightly
      env: CHECK_CLIPPY=y
  fast_finish: true

# Caching strategy as found in https://levans.fr/rust_travis_cache.html (cache/before_cache)
cache:
  directories:
    - /home/travis/.cargo

before_cache: |
  rm -rf /home/travis/.cargo/registry

install: |
  if [ ! -z "$CHECK_FMT" ]; then rustup component add rustfmt-preview; fi
  if [ ! -z "$CHECK_CLIPPY" ]; then rustup component add clippy-preview; fi

before_script: |
  if [ ! -z "$CHECK_FMT" ]; then PATH=$PATH:~/.cargo/bin cargo fmt --all -- --check; fi
  if [ ! -z "$CHECK_CLIPPY" ]; then PATH=$PATH:~/.cargo/bin cargo clippy --all -- -D clippy; fi
  if [ ! -z "$MINIMAL" ]; then PATH=$PATH:~/.cargo/bin cargo update -Z minimal-versions; fi

script: |
  if [ -n "$MINIMAL" ]; then
    cargo build
    exit 0
  fi
  if [ -n "$NIGHTLY" ]; then
    cargo build --all-targets
  else
    cargo build --all
  fi
  cargo test --tests --examples

notifications:
    webhooks:
        urls:
            - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MG9uZWV5ZWQlM0FtYXRyaXgub3JnLyUyMUpyV0JYUFRTWk9sR0FydVpCdiUzQW1hdHJpeC5vcmc"
        on_success: change  # always|never|change
        on_failure: always
        on_start: never