meta: add Azure Pipelines CI config (#191)

* First draft of Azure Pipelines CI config

You'll have to follow the instructions over at
https://github.com/crate-ci/azure-pipelines to get it fully set up.
Might also run into some weirdness with having to change the "default"
branch once merged. But 🎉

Oh, yeah, and need to also update Cargo.toml, README badge, etc.

* Also check benchmarks

* Pool is set per job, not per stage

* Not a template anymore

* Use correct service connection name

* Disable readme doctest pending rewrite

* Fully remove old doctest readme

* Don't run cargo check yet

We need support for _not_ running with `--all-features` due to the
nightly requirement for async/await which is enabled by a feature in
`tracing`. This will eventually land with
https://github.com/crate-ci/azure-pipelines/pull/42.

* Hack dependency chain

Closes #177
This commit is contained in:
Jon Gjengset
2019-07-22 15:06:19 -04:00
committed by Eliza Weisman
parent fc6331647e
commit b30821e81e
5 changed files with 89 additions and 11 deletions

View File

@@ -25,9 +25,6 @@ jobs:
install: rustup component add rustfmt-preview
name: "rustfmt"
rust: stable
- script: cargo test --features=doctest-readme --all
name: "doctest readme"
rust: nightly
- script: (cd tracing-futures/test_std_future && cargo test)
name: "futures nightly"
rust: nightly

89
azure-pipelines.yml Normal file
View File

@@ -0,0 +1,89 @@
stages:
# Blocked on https://github.com/crate-ci/azure-pipelines/pull/42
# See also https://github.com/tokio-rs/tracing/pull/191#issuecomment-513872071
# When we bring these back, add check as a dependency for the other stages
# - stage: check
# displayName: Compilation check
# dependsOn: []
# jobs:
# - template: azure/cargo-check.yml@templates
# parameters:
# name: cargo_check
# benches: true
# # This represents the minimum Rust version supported.
# # Tests are not run as tests may require newer versions of rust.
# - stage: msrv
# displayName: "Minimum supported Rust version"
# dependsOn: []
# jobs:
# - template: azure/cargo-check.yml@templates
# parameters:
# rust: 1.34.0
- stage: custom
displayName: "Special tests"
# dependsOn: check
dependsOn: []
jobs:
- job: custom_stable
pool:
vmImage: ubuntu-16.04
displayName: "Stable custom tests"
steps:
- template: azure/install-rust.yml@templates
parameters:
rust: stable
- bash: cd tracing/test-log-support && cargo test
displayName: "Test log support"
- bash: cd tracing/test_static_max_level_features && cargo test
displayName: "Test static max level features"
- job: custom_nightly
pool:
vmImage: ubuntu-16.04
displayName: "Nightly custom tests"
continueOnError: true
steps:
- template: azure/install-rust.yml@templates
parameters:
rust: nightly
# TODO: add back README doctest
# https://github.com/tokio-rs/tracing/pull/191#issuecomment-513394436
- bash: cd tracing-futures/test_std_future && cargo test
displayName: "Test std::future support for tracing-futures"
- stage: style
displayName: Style linting
# dependsOn: check
dependsOn: []
jobs:
- template: azure/rustfmt.yml@templates
parameters:
name: rustfmt
- template: azure/rustfmt.yml@templates
parameters:
name: rustfmt_beta
rust: beta
allow_fail: true
- template: azure/cargo-check.yml@templates
parameters:
name: warning_free
err_on_warn: true
allow_fail: true
- stage: test
displayName: Test suite
# dependsOn: check
dependsOn: []
jobs:
- template: azure/tests.yml@templates
- stage: coverage
displayName: Code coverage
dependsOn: test
jobs:
- template: azure/coverage.yml@templates
parameters:
codecov_token: $(CODECOV_TOKEN_SECRET)
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
endpoint: tracing

View File

@@ -53,8 +53,6 @@ release_max_level_info = []
release_max_level_debug = []
release_max_level_trace = []
doctest-readme = []
[[bench]]
name = "subscriber"
harness = false

View File

@@ -1,7 +1,6 @@
#![doc(html_root_url = "https://docs.rs/tracing/0.1.3")]
#![deny(missing_debug_implementations, missing_docs, unreachable_pub)]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(feature = "doctest-readme", feature(external_doc))]
//! A scoped, structured logging and diagnostics system.
//!
@@ -399,9 +398,6 @@ pub mod level_filters;
pub mod span;
pub mod subscriber;
#[cfg(feature = "doctest-readme")]
mod readme_doctest;
mod sealed {
pub trait Sealed {}
}

View File

@@ -1,2 +0,0 @@
#![cfg_attr(feature = "doctest-readme", doc(include = "../README.md"))]
type _DoctestReadme = ();