base64-compat 1.0.0

encodes and decodes base64 as bytes or utf8 - compatible with older Rust versions
Documentation
---
language: rust
dist: trusty
sudo: required

matrix:
  include:
    - rust: 1.19.0 # latest mrustc
      env: ONLY_BUILD=yes
    - rust: 1.24.0 # latest Debian
      env: ONLY_BUILD=yes
    - rust: stable
    - rust: beta
    - rust: nightly
      addons:
        apt:
          packages:
            # cargo-tarpaulin needs this
            - libssl-dev
      install:
        # For test coverage. In install step so that it can use cache.
        - cargo tarpaulin --version || RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install --force cargo-tarpaulin
        - cargo fuzz --version || cargo install --force cargo-fuzz

cache: cargo

env:
  # prevent cargo fuzz list from printing with color
  - TERM=dumb

script:
  - cargo build --verbose
  - 'if [[ "$ONLY_BUILD" != yes ]]; then cargo test --verbose; fi'
  - 'if [[ "$ONLY_BUILD" != yes ]]; then cargo doc --verbose; fi'
  - 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo bench --no-run; fi'
  # run for just a second to confirm that it can build and run ok
  - 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo fuzz list | xargs -L 1 -I FUZZER cargo fuzz run FUZZER -- -max_total_time=1; fi'

after_success: |
  if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then
    # Calculate test coverage
    cargo tarpaulin --out Xml
    bash <(curl -s https://codecov.io/bash)
  fi