-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
chore: check each feature works properly #1695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6bb281b
3eebedc
775ffe4
94a39da
6d4650e
7aee1f8
d625c15
6bee4d8
f09653b
4eb745e
8ea0ebd
7a05995
0653ca3
519fc6f
a7c13b7
3bfb32f
6ee97be
3d0da91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,5 @@ members = [ | |
|
||
# Internal | ||
"examples", | ||
"tests-build", | ||
"tests-integration", | ||
] |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -20,6 +20,11 @@ jobs: | |||||||||||||||||
# rust_version: stable | ||||||||||||||||||
rust_version: ${{ parameters.rust }} | ||||||||||||||||||
|
||||||||||||||||||
- script: cargo install cargo-hack | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is nitpicky, but it might be helpful to have a comment here explaining what we're using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wrote descriptions for 'check' scripts, but if necessary, I'd happy to add a description to the 'install' script. tokio/ci/azure-test-stable.yml Lines 47 to 50 in 02f7264
tokio/ci/azure-test-stable.yml Lines 78 to 81 in 02f7264
|
||||||||||||||||||
displayName: Install cargo-hack | ||||||||||||||||||
# FIXME(taiki-e): many features of current cargo-hack are not available on windows: https://github.com/taiki-e/cargo-hack/issues/3 | ||||||||||||||||||
condition: not(eq(variables['Agent.OS'], 'Windows_NT')) | ||||||||||||||||||
|
||||||||||||||||||
- template: azure-is-release.yml | ||||||||||||||||||
|
||||||||||||||||||
- ${{ each crate in parameters.crates }}: | ||||||||||||||||||
|
@@ -28,17 +33,28 @@ jobs: | |||||||||||||||||
env: | ||||||||||||||||||
LOOM_MAX_PREEMPTIONS: 2 | ||||||||||||||||||
CI: 'True' | ||||||||||||||||||
displayName: ${{ crate.key }} - cargo test | ||||||||||||||||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate.key }} | ||||||||||||||||||
|
||||||||||||||||||
# Run with each specified feature | ||||||||||||||||||
- ${{ each feature in crate.value }}: | ||||||||||||||||||
- script: cargo test --no-default-features --features ${{ feature }} | ||||||||||||||||||
env: | ||||||||||||||||||
LOOM_MAX_PREEMPTIONS: 2 | ||||||||||||||||||
CI: 'True' | ||||||||||||||||||
displayName: ${{ crate.key }} - cargo test --features ${{ feature }} | ||||||||||||||||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate.key }} | ||||||||||||||||||
displayName: ${{ crate }} - cargo test | ||||||||||||||||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate }} | ||||||||||||||||||
|
||||||||||||||||||
# Run with all crate features | ||||||||||||||||||
- script: cargo test --all-features | ||||||||||||||||||
env: | ||||||||||||||||||
LOOM_MAX_PREEMPTIONS: 2 | ||||||||||||||||||
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 }} | ||||||||||||||||||
# FIXME(taiki-e): many features of current cargo-hack are not available on windows: https://github.com/taiki-e/cargo-hack/issues/3 | ||||||||||||||||||
condition: not(eq(variables['Agent.OS'], 'Windows_NT')) | ||||||||||||||||||
|
||||||||||||||||||
- template: azure-patch-crates.yml | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -48,14 +64,25 @@ jobs: | |||||||||||||||||
env: | ||||||||||||||||||
LOOM_MAX_PREEMPTIONS: 2 | ||||||||||||||||||
CI: 'True' | ||||||||||||||||||
displayName: ${{ crate.key }} - cargo test | ||||||||||||||||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate.key }} | ||||||||||||||||||
|
||||||||||||||||||
# Run with each specified feature | ||||||||||||||||||
- ${{ each feature in crate.value }}: | ||||||||||||||||||
- script: cargo test --no-default-features --features ${{ feature }} | ||||||||||||||||||
env: | ||||||||||||||||||
LOOM_MAX_PREEMPTIONS: 2 | ||||||||||||||||||
CI: 'True' | ||||||||||||||||||
displayName: ${{ crate.key }} - cargo test --features ${{ feature }} | ||||||||||||||||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate.key }} | ||||||||||||||||||
displayName: ${{ crate }} - cargo test | ||||||||||||||||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate }} | ||||||||||||||||||
|
||||||||||||||||||
# Run with all crate features | ||||||||||||||||||
- script: cargo test --all-features | ||||||||||||||||||
env: | ||||||||||||||||||
LOOM_MAX_PREEMPTIONS: 2 | ||||||||||||||||||
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 }} | ||||||||||||||||||
# FIXME(taiki-e): many features of current cargo-hack are not available on windows: https://github.com/taiki-e/cargo-hack/issues/3 | ||||||||||||||||||
condition: not(eq(variables['Agent.OS'], 'Windows_NT')) | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, many features of current cargo-hack are not available on windows. (taiki-e/cargo-hack#3) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However, it seems many features are not directly related to OS-specific dependencies (7aee1f8), so for now, I think this is almost all right. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to fix this in taiki-e/cargo-hack#6, but I couldn't fix it completely. |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed :)