ci: use -Z avoid-dev-deps in features check instead of --no-dev-deps (#1812)

This commit is contained in:
Taiki Endo
2019-11-22 14:13:18 -08:00
committed by Carl Lerche
parent bf741fec35
commit 7cd63fb946
4 changed files with 43 additions and 26 deletions
+32
View File
@@ -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
+1 -1
View File
@@ -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
-23
View File
@@ -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 }}