summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-11-23 07:13:18 +0900
committerCarl Lerche <me@carllerche.com>2019-11-22 14:13:18 -0800
commit7cd63fb94608ce8c70b8a7a7a4118cba658b3bcc (patch)
tree7c8e07bec17c7b6002f808965b0c8d5a7c642a95
parentbf741fec359736d465fa588d8feea1a48e19c055 (diff)
ci: use -Z avoid-dev-deps in features check instead of --no-dev-deps (#1812)
-rw-r--r--azure-pipelines.yml12
-rw-r--r--ci/azure-check-features.yml32
-rw-r--r--ci/azure-check-minrust.yml2
-rw-r--r--ci/azure-test-stable.yml23
4 files changed, 43 insertions, 26 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index d660b165..2f102b0a 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -3,6 +3,7 @@ pr: ["master"]
variables:
RUSTFLAGS: -Dwarnings
+ nightly: nightly-2019-11-16
jobs:
# Test top level crate
@@ -43,6 +44,12 @@ jobs:
name: cross
rust: stable
+# Check each feature works properly
+- template: ci/azure-check-features.yml
+ parameters:
+ rust: $(nightly)
+ name: check_features
+
# This represents the minimum Rust version supported by
# Tokio. Updating this should be done in a dedicated PR and
# cannot be greater than two 0.x releases prior to the
@@ -53,7 +60,7 @@ jobs:
- template: ci/azure-check-minrust.yml
parameters:
name: minrust
- rust_version: 1.39.0
+ rust: 1.39.0
# Check formatting
- template: ci/azure-rustfmt.yml
@@ -70,7 +77,7 @@ jobs:
# Check doc generation
- template: ci/azure-check-docs.yml
parameters:
- rust: nightly-2019-11-16
+ rust: $(nightly)
name: docs
# - template: ci/azure-tsan.yml
@@ -89,4 +96,5 @@ jobs:
- loom
- cross
- minrust
+ - check_features
# - tsan
diff --git a/ci/azure-check-features.yml b/ci/azure-check-features.yml
new file mode 100644
index 00000000..a80af0d3
--- /dev/null
+++ b/ci/azure-check-features.yml
@@ -0,0 +1,32 @@
+jobs:
+- job: ${{ parameters.name }}
+ displayName: Check features
+ strategy:
+ matrix:
+ Linux:
+ vmImage: ubuntu-16.04
+ MacOS:
+ vmImage: macOS-10.13
+ Windows:
+ vmImage: vs2017-win2016
+ pool:
+ vmImage: $(vmImage)
+
+ steps:
+ - template: azure-install-rust.yml
+ parameters:
+ rust_version: ${{ parameters.rust }}
+
+ - template: azure-patch-crates.yml
+
+ - script: cargo install cargo-hack
+ displayName: Install cargo-hack
+
+ # Check each feature works properly
+ # * --each-feature
+ # run for each feature which includes --no-default-features and default features of package
+ # * -Z avoid-dev-deps
+ # build without dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
+ # tracking-issue: https://github.com/rust-lang/cargo/issues/5133
+ - script: cargo hack check --all --each-feature -Z avoid-dev-deps
+ displayName: cargo hack check --all --each-feature
diff --git a/ci/azure-check-minrust.yml b/ci/azure-check-minrust.yml
index 7a5e602a..1a28f53b 100644
--- a/ci/azure-check-minrust.yml
+++ b/ci/azure-check-minrust.yml
@@ -6,7 +6,7 @@ jobs:
steps:
- template: azure-install-rust.yml
parameters:
- rust_version: ${{ parameters.rust_version }}
+ rust_version: ${{ parameters.rust }}
- template: azure-patch-crates.yml
diff --git a/ci/azure-test-stable.yml b/ci/azure-test-stable.yml
index e33b6bbc..5d806a6a 100644
--- a/ci/azure-test-stable.yml
+++ b/ci/azure-test-stable.yml
@@ -19,9 +19,6 @@ jobs:
parameters:
rust_version: ${{ parameters.rust }}
- - script: cargo install cargo-hack
- displayName: Install cargo-hack
-
- template: azure-is-release.yml
- ${{ each crate in parameters.crates }}:
@@ -41,16 +38,6 @@ jobs:
displayName: ${{ crate }} - cargo test --all-features
workingDirectory: $(Build.SourcesDirectory)/${{ crate }}
- # Check each specified feature works properly
- # * --each-feature - run for each feature which includes --no-default-features and default features of package
- # * --no-dev-deps - build without dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
- - script: cargo hack check --each-feature --no-dev-deps
- env:
- LOOM_MAX_PREEMPTIONS: 2
- CI: 'True'
- displayName: ${{ crate }} - cargo hack check --each-feature
- workingDirectory: $(Build.SourcesDirectory)/${{ crate }}
-
- template: azure-patch-crates.yml
- ${{ each crate in parameters.crates }}:
@@ -69,13 +56,3 @@ jobs:
CI: 'True'
displayName: ${{ crate }} - cargo test --all-features
workingDirectory: $(Build.SourcesDirectory)/${{ crate }}
-
- # Check each specified feature works properly
- # * --each-feature - run for each feature which includes --no-default-features and default features of package
- # * --no-dev-deps - build without dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866
- - script: cargo hack check --each-feature --no-dev-deps
- env:
- LOOM_MAX_PREEMPTIONS: 2
- CI: 'True'
- displayName: ${{ crate }} - cargo hack check --each-feature
- workingDirectory: $(Build.SourcesDirectory)/${{ crate }}