Skip to content

Commit

Permalink
Fix aws-config CI time regression (#3271)
Browse files Browse the repository at this point in the history
## 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._
  • Loading branch information
rcoh authored Dec 1, 2023
1 parent 2cac4d7 commit 75b4c35
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion aws/rust-runtime/aws-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ repository = "https://github.com/smithy-lang/smithy-rs"
behavior-version-latest = []
client-hyper = ["aws-smithy-runtime/connector-hyper-0-14-x"]
rustls = ["aws-smithy-runtime/tls-rustls", "client-hyper"]
allow-compilation = [] # our tests use `cargo test --all-features` and native-tls breaks CI
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-runtime/rt-tokio", "tokio/rt"]
sso = ["dep:aws-sdk-sso", "dep:aws-sdk-ssooidc", "dep:ring", "dep:hex", "dep:zeroize", "aws-smithy-runtime-api/http-auth"]
credentials-process = ["tokio/process"]

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

# deprecated: this feature does nothing
allow-compilation = []

[dependencies]
aws-credential-types = { path = "../../sdk/build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] }
aws-http = { path = "../../sdk/build/aws-sdk/sdk/aws-http" }
Expand Down
14 changes: 12 additions & 2 deletions tools/ci-scripts/check-aws-config
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,18 @@ cargo "+${RUST_NIGHTLY_VERSION:-nightly}" check-external-types --all-features --
echo "${C_YELLOW}## Checking for duplicate dependency versions in the normal dependency graph with all features enabled${C_RESET}"
cargo tree -d --edges normal --all-features

echo "${C_YELLOW}## Testing every combination of features${C_RESET}"
cargo hack test --feature-powerset --exclude-all-features --exclude-features native-tls
# the crate has `allow-compilation` which needs to be deprecated

echo "${C_YELLOW}## Checking every combination of features${C_RESET}"
cargo hack check --feature-powerset --exclude-all-features --exclude-features allow-compilation

echo "${C_YELLOW}## Testing each feature in isolation${C_RESET}"
# these features are missed by the following check because they are grouped
cargo hack test --each-feature --include-features rt-tokio,client-hyper,rustls --exclude-no-default-features

# This check will check other individual features and no-default-features
# grouping these features because they don't interact
cargo hack test --feature-powerset --exclude-all-features --exclude-features allow-compilation --group-features rt-tokio,client-hyper,rustls

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

0 comments on commit 75b4c35

Please sign in to comment.