devicemapper 0.28.1

A library for using Linux device mapper
Documentation
---
os: linux
group: edge

addons:
  apt:
    packages:
      - libdevmapper-dev

language: rust

jobs:
  fast_finish: true
  allow_failures:
    # Allow audit task to fail
    - env: TASK=audit
    # Allow stable clippy task to fail
    - rust: stable
      env: TASK=clippy
  include:

    # MANDATORY CHECKS USING CURRENT DEVELOPMENT COMPILER
    - name: "Run rustfmt on recommended development toolchain"
      rust: 1.47.0
      before_script:
        - rustup component add rustfmt
      env: TASK=travis_fmt
    - name: "Run clippy on recommended development toolchain"
      rust: 1.47.0
      before_script:
        - rustup component add clippy
      env: TASK=clippy

    # MANDATORY TESTING USING LOWEST SUPPORTED COMPILER
    - name: "Run all tests on lowest supported toolchain"
      rust: 1.45.0
      script:
        - >
          sudo PATH=${TRAVIS_HOME}/.cargo/bin:$PATH
          make -f Makefile sudo_test


    # MANDATORY TESTING ON STABLE
    - name: "Build on stable toolchain"
      rust: stable
      env: TASK=build
    - name: "Run all tests on stable toolchain"
      rust: stable
      script:
        - >
          sudo PATH=${TRAVIS_HOME}/.cargo/bin:$PATH
          make -f Makefile sudo_test
    - name: "Build docs on stable toolchain"
      rust: stable
      env: TASK=docs


    # ALLOWED FAILURES
    # Run "cargo audit" on rust stable. Make it an allowed failure. It
    # should be an advisory and should not gate our development.
    - name: "Audit code for security advisories on stable toolchain"
      rust: stable
      env: TASK=audit
    # Allowed because a failure may occur after a new Rust stable
    # version is released.
    - name: "Run clippy on stable toolchain"
      rust: stable
      before_script:
        - rustup component add clippy
      env: TASK=clippy

    # VERIFICATION OF TEST INFRASTRUCTURE
    - name: "run yamllint 1.23.0 on .travis.yml"
      language: python
      python: "3.7.6"
      install: pip3 install yamllint==1.23.0
      env: TASK=yamllint

branches:
  only: master

script: make -f Makefile $TASK