Skip to content

Commit 75b4c35

Browse files
authored
Fix aws-config CI time regression (#3271)
## Motivation and Context This reduces checking aws-config to 6 minutes, down from 28 ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent 2cac4d7 commit 75b4c35

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

aws/rust-runtime/aws-config/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ repository = "https://github.com/smithy-lang/smithy-rs"
1212
behavior-version-latest = []
1313
client-hyper = ["aws-smithy-runtime/connector-hyper-0-14-x"]
1414
rustls = ["aws-smithy-runtime/tls-rustls", "client-hyper"]
15-
allow-compilation = [] # our tests use `cargo test --all-features` and native-tls breaks CI
1615
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-runtime/rt-tokio", "tokio/rt"]
1716
sso = ["dep:aws-sdk-sso", "dep:aws-sdk-ssooidc", "dep:ring", "dep:hex", "dep:zeroize", "aws-smithy-runtime-api/http-auth"]
1817
credentials-process = ["tokio/process"]
1918

2019
default = ["client-hyper", "rustls", "rt-tokio", "credentials-process", "sso"]
2120

21+
# deprecated: this feature does nothing
22+
allow-compilation = []
23+
2224
[dependencies]
2325
aws-credential-types = { path = "../../sdk/build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] }
2426
aws-http = { path = "../../sdk/build/aws-sdk/sdk/aws-http" }

tools/ci-scripts/check-aws-config

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,18 @@ cargo "+${RUST_NIGHTLY_VERSION:-nightly}" check-external-types --all-features --
3535
echo "${C_YELLOW}## Checking for duplicate dependency versions in the normal dependency graph with all features enabled${C_RESET}"
3636
cargo tree -d --edges normal --all-features
3737

38-
echo "${C_YELLOW}## Testing every combination of features${C_RESET}"
39-
cargo hack test --feature-powerset --exclude-all-features --exclude-features native-tls
38+
# the crate has `allow-compilation` which needs to be deprecated
39+
40+
echo "${C_YELLOW}## Checking every combination of features${C_RESET}"
41+
cargo hack check --feature-powerset --exclude-all-features --exclude-features allow-compilation
42+
43+
echo "${C_YELLOW}## Testing each feature in isolation${C_RESET}"
44+
# these features are missed by the following check because they are grouped
45+
cargo hack test --each-feature --include-features rt-tokio,client-hyper,rustls --exclude-no-default-features
46+
47+
# This check will check other individual features and no-default-features
48+
# grouping these features because they don't interact
49+
cargo hack test --feature-powerset --exclude-all-features --exclude-features allow-compilation --group-features rt-tokio,client-hyper,rustls
4050

4151
echo "${C_YELLOW}## Checking the wasm32-unknown-unknown and wasm32-wasi targets${C_RESET}"
4252
cargo check --target wasm32-unknown-unknown --no-default-features

0 commit comments

Comments
 (0)