<commit_before>language: rust

rust:
  - stable
  - nightly

os:
  - linux
  - osx

notifications:
  email:
    on_success: never

sudo: false

cache:
  apt: true
  directories:
    - target/debug/deps
    - target/debug/build

branches:
  except:
    - staging.tmp

matrix:
  allow_failures:
    - rust: nightly

  include:
  - rust: nightly-2017-07-25
    env:
      - RUSTFLAGS="-C link-dead-code"

    addons:
      apt:
        packages:
          - binutils-dev
          - libcurl4-openssl-dev
          - zlib1g-dev
          - libdw-dev
          - libiberty-dev

    before_script:
    - cargo install clippy --vers 0.0.145
    - cargo install rustfmt-nightly --vers 0.2.1

    script:
    - cargo clippy -- -D warnings
    - cargo fmt -- --write-mode=diff
    - cargo clean
    - cargo test --verbose
    # - RUSTFLAGS="-Z sanitizer=leak" cargo test --verbose --target x86_64-unknown-linux-gnu

    after_success:
    - ./.travis/coverage.sh<commit_msg>feat(ci): try to cache clippy and rustfmt<commit_after>language: rust

rust:
  - stable
  - nightly

os:
  - linux
  - osx

notifications:
  email:
    on_success: never

sudo: false

cache:
  apt: true
  directories:
    - $HOME/.cargo/bin
    - target/debug/deps

branches:
  except:
    - staging.tmp

matrix:
  allow_failures:
    - rust: nightly

  include:
  - rust: nightly-2017-07-25
    env:
      - RUSTFLAGS="-C link-dead-code"

    addons:
      apt:
        packages:
          - binutils-dev
          - libcurl4-openssl-dev
          - zlib1g-dev
          - libdw-dev
          - libiberty-dev

    before_script:
    - cargo install clippy --vers 0.0.145 || true
    - cargo install rustfmt-nightly --vers 0.2.1 || true

    script:
    - cargo test --verbose
    - cargo clippy -- -D warnings
    - cargo fmt -- --write-mode=diff
    # - RUSTFLAGS="-Z sanitizer=leak" cargo test --verbose --target x86_64-unknown-linux-gnu

    after_success:
    - ./.travis/coverage.sh
{'fraction_non_alphanumeric': 0.11475409836065574, 'fraction_numerical': 0.022540983606557378, 'mean_word_length': 1.7979942693409743, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '701444', 'n_tokens_mistral': 727, 'n_tokens_neox': 684, 'n_words': 153}