language: rust

rust:
  - 1.13.0
  - 1.14.0
  - 1.15.1
  - 1.16.0
  - 1.17.0
  - beta
  - nightly

# Opt for a less ancient distribution with a C++11-compliant compiler, in order
# to compile libfuzzer.
dist: trusty
sudo: false

addons:
  apt:
    packages:
      - flac

cache:
  directories:
    # Cache the fuzzing corpus, so it does not have to discover the entire corpus
    # again every time, and it can focus on finding bugs instead.
    - fuzz_corpus

    # Cache the test samples to not put so much load on archive.org, but on
    # Travis' S3 buckets instead.
    - testsamples

before_script:
  - cd testsamples && ./populate.sh && cd ..

script:
  # Do not use the default --verbose commands, they are only noisy.
  - cargo build
  - cargo test

  # On the nightly configuration, fuzz for 15 minutes.
  - FUZZ_SECONDS=900 tools/fuzz_on_ci.sh

language: rust

rust:
  - 1.13.0
  - 1.14.0
  - 1.15.1
  - 1.16.0
  - 1.17.0
  - beta
  - nightly

# Opt for a less ancient distribution with a C++11-compliant compiler, in order
# to compile libfuzzer.
dist: trusty
sudo: false

addons:
  apt:
    packages:
      - flac

cache:
  directories:
    # Cache the fuzzing corpus, so it does not have to discover the entire corpus
    # again every time, and it can focus on finding bugs instead.
    # TODO: This is broken, libfuzzer seems to not recognize the corpus somehow.
    # - fuzz_corpus

    # Cache the test samples to not put so much load on archive.org, but on
    # Travis' S3 buckets instead.
    - testsamples

before_script:
  - cd testsamples && ./populate.sh && cd ..

script:
  # Do not use the default --verbose commands, they are only noisy.
  - cargo build
  - cargo test

  # On the nightly configuration, fuzz for 15 minutes.
  # TODO: This is broken, libfuzzer does not recognize the cached corpus.
  # - FUZZ_SECONDS=900 tools/fuzz_on_ci.sh

Disable fuzzing on CI for now, it is broken
Disable fuzzing on CI for now, it is broken

Libfuzzer does not load the corpus, even when it has been populated. And
starting from scratch every time is not very useful; a decent corpus is
required to find the interesting paths. Fuzzing from an empty corpus
every time is not going to uncover newly introduced bugs.
