pin-project 0.4.1

A crate for safe and ergonomic pin-projection.
Documentation
# Refs: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml
schedules:
- cron: "0 1 * * *"
  displayName: Cron (Daily)
  branches:
    include:
      - master
  always: true

trigger:
- master
- staging
- trying

variables:
  RUSTFLAGS: -Dwarnings

jobs:
# This is the minimum Rust version supported by pin-project.
# When updating this, the reminder to update the minimum supported
# Rust version in README.md.
#
# Tests are not run as tests may require newer versions of rust.
- template: ci/azure-test.yml
  parameters:
    toolchain: 1.33.0
    name: minrust
    cmd: check

- template: ci/azure-test.yml
  parameters:
    toolchain: stable
    name: stable
    cross: true
- template: ci/azure-test.yml
  parameters:
    toolchain: beta
    name: beta
- template: ci/azure-test.yml
  parameters:
    toolchain: nightly
    name: nightly

- job: compiletest
  pool:
    vmImage: ubuntu-16.04
  steps:
    - template: ci/azure-install-rust.yml
      parameters:
        toolchain: nightly
    - script: |
        cargo clean
        RUSTFLAGS='--cfg compiletest --cfg pin_project_show_unpin_struct' cargo test -p pin-project --all-features --test compiletest
      displayName: compiletest

- job: clippy
  pool:
    vmImage: ubuntu-16.04
  steps:
    - template: ci/azure-install-rust.yml
      parameters:
        toolchain: nightly
    - script: |
        set +e
        if rustup component add clippy; then
          set -e
        else
          # If clippy is unavailable on the latest nightly,
          # use the latest toolchain with clippy available.
          # Refs: https://github.com/rust-lang/rustup-components-history#the-web-part
          set -e
          target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy`
          echo "'clippy' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead"
          rustup toolchain install nightly-$target
          rustup default nightly-$target
          rustup component add clippy
          rustup toolchain list
          rustc -Vv
          cargo -V
        fi
        cargo clippy --version
      displayName: Install clippy
    - script: |
        cargo clippy --all --all-features
      displayName: cargo clippy

- job: rustfmt
  pool:
    vmImage: ubuntu-16.04
  steps:
    - template: ci/azure-install-rust.yml
      parameters:
        toolchain: nightly
    - script: |
        set +e
        if rustup component add rustfmt; then
          set -e
        else
          # If rustfmt is unavailable on the latest nightly,
          # use the latest toolchain with rustfmt available.
          # Refs: https://github.com/rust-lang/rustup-components-history#the-web-part
          set -e
          target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`
          echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead"
          rustup toolchain install nightly-$target
          rustup default nightly-$target
          rustup component add rustfmt
          rustup toolchain list
          rustc -Vv
          cargo -V
        fi
        cargo fmt --version
      displayName: Install rustfmt
    - script: |
        cargo fmt --all -- --check
      displayName: cargo fmt -- --check

- job: rustdoc
  pool:
    vmImage: ubuntu-16.04
  steps:
    - template: ci/azure-install-rust.yml
      parameters:
        toolchain: nightly
    - script: |
        RUSTDOCFLAGS=-Dwarnings cargo doc --no-deps --all --all-features
      displayName: cargo doc