<commit_before>language: rust

sudo: required

cache:
  cargo: true
  directories:
    - ~/.rustup

install:
  - curl https://sh.rustup.rs -sSf |
    sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION &&
    rustup component add clippy-preview
  - bash -c 'if [ "$TEST" = "sanitizers-and-cross-build" ]; then
      rustup target add i686-unknown-linux-gnu;
      rustup target add x86_64-pc-windows-gnu;
    fi'
  - source ~/.cargo/env

matrix:
  include:
    - os: linux
      rust: nightly-2018-10-26
      env:
        - TEST=sanitizers-and-cross-build
    - os: osx
      rust: stable
      env:
        - TEST=osx
    - os: linux
      rust: stable
      env:
        - TEST=standard
    - os: linux
      rust: stable
      env:
        - TEST=crash
        - RUST_BACKTRACE=1
    - os: linux
      rust: stable
      env:
        - TEST=qc
    - os: linux
      rust: stable
      env:
        - TEST=clippy
        - RUSTFLAGS=-Dwarnings
  allow_failures:
    - os: linux
      rust: stable
      env:
        - TEST=clippy
        - RUSTFLAGS=-Dwarnings

script:
  - bash -c 'case "$TEST" in
               osx)
                 pushd tests &&
                 cargo check &&
                 cargo check --features=all &&
                 cargo test test_crash_recovery --release -- --ignored --nocapture &&
                 cargo test tree --release
                 ;;
               qc)
                 pushd tests &&
                 echo "qc log" &&
                 cargo test quickcheck_log_works --release -- --ignored --nocapture &&
                 echo "qc pagecache" &&
                 cargo test quickcheck_pagecache_works --release -- --ignored --nocapture &&
                 echo "qc tree" &&
                 cargo test quickcheck_tree_matches_btreemap --release -- --ignored --nocapture
                 ;;
               clippy)
                 cargo clippy
                 ;;
               sanitizers-and-cross-build)
                 pushd benchmarks/stress2 &&
                 echo "lsan" &&
                 cargo clean &&
                 export RUSTFLAGS="-Z sanitizer=leak" &&
                 cargo build --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu &&
                 sudo rm -rf default.sled &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=30 &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=6 &&

                 echo "asan" &&
                 cargo clean &&
                 export RUSTFLAGS="-Z sanitizer=address" &&
                 export ASAN_OPTIONS="detect_odr_violation=0" &&
                 cargo build --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu &&
                 sudo rm -rf default.sled &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=30 &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=6 &&
                 unset ASAN_OPTIONS &&

                 echo "tsan" &&
                 cargo clean &&
                 export RUSTFLAGS="-Z sanitizer=thread" &&
                 export TSAN_OPTIONS=suppressions=${TRAVIS_BUILD_DIR}/tsan_suppressions.txt &&
                 sudo rm -rf default.sled &&
                 cargo run --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu -- --duration=30 &&
                 cargo run --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu -- --duration=6 &&
                 unset RUSTFLAGS &&
                 unset TSAN_OPTIONS &&
                 popd &&

                 echo "cross build" &&
                 echo "https://github.com/rust-lang/cargo/issues/4753" &&
                 pushd crates/sled      && cargo check --target i686-unknown-linux-gnu --features=nightly && popd &&
                 pushd crates/sled      && cargo check --target x86_64-pc-windows-gnu  --features=nightly && popd &&
                 pushd crates/pagecache && cargo check --target i686-unknown-linux-gnu --features=nightly && popd &&
                 pushd crates/pagecache && cargo check --target x86_64-pc-windows-gnu  --features=nightly && popd
                 ;;
               crash)
                 pushd tests &&
                 cargo test test_crash_recovery --release -- --nocapture --ignored
                 ;;
               standard)
                 pushd tests &&
                 cargo check &&
                 cargo check --features=all &&
                 popd &&
                 cargo test --release
                 ;;
               concurrent)
                 cargo test concurrent --release -- --ignored --nocapture
                 ;;
               *)
                 echo "unknown TEST value \"$TEST\"";
                 exit 1
                 ;;
             esac'
<commit_msg>Add target to travis cache<commit_after>language: rust

sudo: required

cache:
  cargo: true
  directories:
    - ~/.rustup
    - ~/.cargo
    - $TRAVIS_BUILD_DIR/target

install:
  - curl https://sh.rustup.rs -sSf |
    sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION &&
    rustup component add clippy-preview
  - bash -c 'if [ "$TEST" = "sanitizers-and-cross-build" ]; then
      rustup target add i686-unknown-linux-gnu;
      rustup target add x86_64-pc-windows-gnu;
    fi'
  - source ~/.cargo/env

matrix:
  include:
    - os: linux
      rust: nightly-2018-10-26
      env:
        - TEST=sanitizers-and-cross-build
    - os: osx
      rust: stable
      env:
        - TEST=osx
    - os: linux
      rust: stable
      env:
        - TEST=standard
    - os: linux
      rust: stable
      env:
        - TEST=crash
        - RUST_BACKTRACE=1
    - os: linux
      rust: stable
      env:
        - TEST=qc
    - os: linux
      rust: stable
      env:
        - TEST=clippy
        - RUSTFLAGS=-Dwarnings
  allow_failures:
    - os: linux
      rust: stable
      env:
        - TEST=clippy
        - RUSTFLAGS=-Dwarnings

script:
  - bash -c 'case "$TEST" in
               osx)
                 pushd tests &&
                 cargo check &&
                 cargo check --features=all &&
                 cargo test test_crash_recovery --release -- --ignored --nocapture &&
                 cargo test tree --release
                 ;;
               qc)
                 pushd tests &&
                 echo "qc log" &&
                 cargo test quickcheck_log_works --release -- --ignored --nocapture &&
                 echo "qc pagecache" &&
                 cargo test quickcheck_pagecache_works --release -- --ignored --nocapture &&
                 echo "qc tree" &&
                 cargo test quickcheck_tree_matches_btreemap --release -- --ignored --nocapture
                 ;;
               clippy)
                 cargo clippy
                 ;;
               sanitizers-and-cross-build)
                 pushd benchmarks/stress2 &&
                 echo "lsan" &&
                 cargo clean &&
                 export RUSTFLAGS="-Z sanitizer=leak" &&
                 cargo build --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu &&
                 sudo rm -rf default.sled &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=30 &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=6 &&

                 echo "asan" &&
                 cargo clean &&
                 export RUSTFLAGS="-Z sanitizer=address" &&
                 export ASAN_OPTIONS="detect_odr_violation=0" &&
                 cargo build --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu &&
                 sudo rm -rf default.sled &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=30 &&
                 sudo target/x86_64-unknown-linux-gnu/debug/stress2 --duration=6 &&
                 unset ASAN_OPTIONS &&

                 echo "tsan" &&
                 cargo clean &&
                 export RUSTFLAGS="-Z sanitizer=thread" &&
                 export TSAN_OPTIONS=suppressions=${TRAVIS_BUILD_DIR}/tsan_suppressions.txt &&
                 sudo rm -rf default.sled &&
                 cargo run --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu -- --duration=30 &&
                 cargo run --features=lock_free_delays,no_jemalloc --target x86_64-unknown-linux-gnu -- --duration=6 &&
                 unset RUSTFLAGS &&
                 unset TSAN_OPTIONS &&
                 popd &&

                 echo "cross build" &&
                 echo "https://github.com/rust-lang/cargo/issues/4753" &&
                 pushd crates/sled      && cargo check --target i686-unknown-linux-gnu --features=nightly && popd &&
                 pushd crates/sled      && cargo check --target x86_64-pc-windows-gnu  --features=nightly && popd &&
                 pushd crates/pagecache && cargo check --target i686-unknown-linux-gnu --features=nightly && popd &&
                 pushd crates/pagecache && cargo check --target x86_64-pc-windows-gnu  --features=nightly && popd
                 ;;
               crash)
                 pushd tests &&
                 cargo test test_crash_recovery --release -- --nocapture --ignored
                 ;;
               standard)
                 pushd tests &&
                 cargo check &&
                 cargo check --features=all &&
                 popd &&
                 cargo test --release
                 ;;
               concurrent)
                 cargo test concurrent --release -- --ignored --nocapture
                 ;;
               *)
                 echo "unknown TEST value \"$TEST\"";
                 exit 1
                 ;;
             esac'

{'fraction_non_alphanumeric': 0.10508474576271186, 'fraction_numerical': 0.01684643040575244, 'mean_word_length': 1.2897460018814675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '443492', 'n_tokens_mistral': 2790, 'n_tokens_neox': 2689, 'n_words': 602}