From 75b4c351add4e28cf0324615b756e3ace7f37780 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Fri, 1 Dec 2023 17:36:44 -0500 Subject: [PATCH] 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._ --- aws/rust-runtime/aws-config/Cargo.toml | 4 +++- tools/ci-scripts/check-aws-config | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index 627a00fd1c..b124e10dd4 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -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" } diff --git a/tools/ci-scripts/check-aws-config b/tools/ci-scripts/check-aws-config index 6a6d2cfc29..135ab38eb1 100755 --- a/tools/ci-scripts/check-aws-config +++ b/tools/ci-scripts/check-aws-config @@ -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