diff --git a/Cargo.toml b/Cargo.toml index 4a2a71ba8..ebae0d3db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ "tokio-util", # Internal + "benches", "examples", "tests-build", "tests-integration", diff --git a/benches/Cargo.toml b/benches/Cargo.toml new file mode 100644 index 000000000..eb26903b0 --- /dev/null +++ b/benches/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "benches" +version = "0.0.0" +publish = false +edition = "2018" + +[dependencies] +tokio = { version = "0.2.0", path = "../tokio", features = ["full"] } +bencher = "0.1.5" + +[[bench]] +name = "spawn" +path = "spawn.rs" +harness = false diff --git a/tokio/benches/spawn.rs b/benches/spawn.rs similarity index 100% rename from tokio/benches/spawn.rs rename to benches/spawn.rs diff --git a/ci/azure-test-stable.yml b/ci/azure-test-stable.yml index 3e5a181b8..a924c9289 100644 --- a/ci/azure-test-stable.yml +++ b/ci/azure-test-stable.yml @@ -30,6 +30,11 @@ jobs: displayName: ${{ crate }} - cargo test --all-features workingDirectory: $(Build.SourcesDirectory)/${{ crate }} + # Check benches + - script: cargo check --all-features --benches + displayName: ${{ crate }} - cargo check --benches + workingDirectory: $(Build.SourcesDirectory)/${{ crate }} + - template: azure-patch-crates.yml - ${{ each crate in parameters.crates }}: diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 6f0591ce6..48b76c746 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -127,7 +127,6 @@ futures = { version = "0.3.0", features = ["async-await"] } loom = { version = "0.2.13", features = ["futures", "checkpoint"] } proptest = "0.9.4" tempfile = "3.1.0" -bencher = "0.1.5" [package.metadata.docs.rs] all-features = true @@ -135,7 +134,3 @@ rustdoc-args = ["--cfg", "docsrs"] [package.metadata.playground] features = ["full"] - -[[bench]] -name = "spawn" -harness = false \ No newline at end of file