sled 0.29.0

a modern embedded database
Documentation
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

variables:
  testKind: 'default'

strategy:
  matrix:
    windows-stable:
      imageName: 'vs2017-win2016'
      rustup_toolchain: stable
    mac-stable:
      imageName: 'macos-10.13'
      rustup_toolchain: stable
    linux-stable:
      imageName: 'ubuntu-16.04'
      rustup_toolchain: stable
    examples:
      imageName: 'ubuntu-16.04'
      rustup_toolchain: stable
      testKind: 'examples'
    sanitizers:
      imageName: 'ubuntu-16.04'
      rustup_toolchain: nightly
      testKind: 'sanitizers'
    cross-compile:
      imageName: 'macos-10.13'
      rustup_toolchain: nightly
      testKind: 'cross-compile'

pool:
  vmImage: $(imageName)

steps:
  - script: |
      curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
      echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
    displayName: Install rust
    condition: ne( variables['Agent.OS'], 'Windows_NT' )
  - script: |
      curl -sSf -o rustup-init.exe https://win.rustup.rs
      rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
      echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
    displayName: Windows install rust
    condition: eq( variables['Agent.OS'], 'Windows_NT' )
  - task: CacheBeta@1
    inputs:
      path: target
      key: Cargo.toml | $(testKind) | $(Agent.OS)
    displayName: 'Cache Build'
    condition: ne( variables['testKind'], 'sanitizers' )
  - script: |
      find target -exec chmod +x {} \; || true
    displayName: chmod cache workaround
    condition: ne( variables['Agent.OS'], 'Windows_NT' )
  - script: cargo build --release --tests --features=testing
    displayName: Cargo build
    condition: eq( variables['testKind'], 'default' )
  - script: cargo test --release --tests --features=testing -- --nocapture
    displayName: Cargo test
    condition: eq( variables['testKind'], 'default' )
  - script: |
      cargo run --example playground &&
      cargo run --example crdt_merge_store
    displayName: examples
    condition: eq( variables['testKind'], 'examples' )
  - script: |
      set -eo pipefail
      echo "cross build"
      echo "https://github.com/rust-lang/cargo/issues/4753"
      scripts/cross_compile.sh
    displayName: cross-build
    condition: eq( variables['testKind'], 'cross-compile' )
  - script: |
      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=$(Agent.BuildDirectory)/s/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
    displayName: sanitizers
    condition: eq( variables['testKind'], 'sanitizers' )