Loading .github/workflows/ci-sdk.yaml +33 −39 Original line number Diff line number Diff line Loading @@ -55,19 +55,22 @@ jobs: name: Smoke Test needs: generate-smoke-test runs-on: ubuntu-latest # To avoid repeating setup boilerplate, we have the actual test commands # in a matrix strategy. These commands get run in the steps after all of the setup. strategy: fail-fast: false matrix: test: - name: Unit Tests run: cargo test $(cat service-with-tests) working-directory: aws-sdk - name: Docs run: cargo doc --no-deps --document-private-items working-directory: aws-sdk - name: Clippy run: cargo clippy working-directory: aws-sdk - name: Unused Dependencies run: cargo +nightly udeps - name: Additional per-crate checks run: ../tools/additional-per-crate-checks.sh ./sdk/ env: # Disable incremental compilation to reduce disk space use CARGO_INCREMENTAL: 0 Loading @@ -76,11 +79,29 @@ jobs: # so we have to manually restore the target directory override CARGO_TARGET_DIR: ../target steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.rust_version }} components: ${{ env.rust_toolchain_components }} default: true - uses: actions-rs/toolchain@v1 with: toolchain: nightly default: false - name: Cache cargo bin uses: actions/cache@v2 with: path: ~/.cargo/bin key: ${{ github.job }}-${{ runner.os }}-${{ env.rust_version }} - name: Install additional cargo binaries run: | if [[ ! -f ~/.cargo/bin/cargo-udeps ]]; then cargo +nightly install cargo-udeps fi if [[ ! -f ~/.cargo/bin/cargo-hack ]]; then cargo install cargo-hack fi - name: Generate a name for the SDK id: gen-name run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV Loading @@ -96,47 +117,20 @@ jobs: with: sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }} target-dir: ../target # This runs the commands from the matrix strategy - name: ${{ matrix.test.name }} run: ${{ matrix.test.run }} working-directory: ${{ matrix.test.working-directory }} working-directory: aws-sdk unused-sdk-dependencies: name: Smoke Test - Unused dependencies needs: generate-smoke-test # Psuedo-job that depends on the smoke-test job so that we don't have to enter # the myriad of test matrix combinations into GitHub's protected branch rules require-smoke-tests: needs: smoke-test runs-on: ubuntu-latest name: Smoke Test Matrix Success steps: # Pinned to the commit hash of v1.3.0 - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 with: sharedKey: ${{ runner.os }}-${{ github.job }} target-dir: ../target - uses: actions-rs/toolchain@v1 with: # Cargo udeps requires nightly toolchain: nightly default: true - name: Generate a name for the SDK id: gen-name run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV - uses: actions/download-artifact@v2 name: Download SDK Artifact with: name: aws-sdk-${{ env.name }}-smoketest-${{ github.sha }} path: artifact - name: untar run: mkdir aws-sdk && cd aws-sdk && tar -xvf ../artifact/sdk.tar - name: Install `cargo udeps` run: cargo install cargo-udeps - name: Check for unused dependencies with default features run: cargo udeps working-directory: aws-sdk - name: Check for unused dependencies with `--all-features` run: cargo udeps --all-features working-directory: aws-sdk env: # Note: the .cargo/config.toml is lost because we untar the SDK rather than checking out the repo, # so we have to manually restore the target directory override CARGO_TARGET_DIR: ../target - name: Run run: echo "We should only get this far if the smoke-test matrix succeeded." standalone-integration-tests-check: name: Standalone Integration Tests - cargo check Loading .github/workflows/ci.yaml +3 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ jobs: codegen-tests: name: Codegen Tests runs-on: ubuntu-latest # To avoid repeating setup boilerplate, we have the actual test commands # in a matrix strategy. These commands get run in the steps after all of the setup. strategy: fail-fast: false matrix: Loading Loading @@ -74,6 +76,7 @@ jobs: uses: actions/setup-java@v1 with: java-version: ${{ env.java_version }} # This runs the commands from the matrix strategy - name: ${{ matrix.test.name }} run: ${{ matrix.test.run }} Loading Loading @@ -113,5 +116,3 @@ jobs: working-directory: ${{ matrix.runtime }}/rust-runtime/ env: RUSTDOCFLAGS: -D warnings - name: Additional per-crate checks run: ./tools/additional-per-crate-checks.sh ${{ matrix.runtime }}/rust-runtime/ CHANGELOG.next.toml +10 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,13 @@ # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false } # author = "rcoh" [[aws-sdk-rust]] message = """ The `meta`, `environment`, and `dns` Cargo feature flags were removed from `aws-config`. The code behind the `dns` flag is now enabled when `rt-tokio` is enabled. The code behind the `meta` and `environment` flags is always enabled now. """ references = ["smithy-rs#961"] meta = { "breaking" = true, "tada" = false, "bug" = false } author = "jdisanti" aws/rust-runtime/aws-config/Cargo.toml +10 −14 Original line number Diff line number Diff line Loading @@ -9,27 +9,19 @@ license = "Apache-2.0" repository = "https://github.com/awslabs/smithy-rs" [features] default-provider = ["profile", "imds", "meta", "sts", "environment", "http-provider"] profile = ["sts", "web-identity-token", "meta", "environment", "imds", "http-provider"] meta = ["tokio/sync"] imds = ["profile", "aws-smithy-http/rt-tokio", "aws-smithy-http-tower", "aws-smithy-json", "tower", "aws-http", "meta"] environment = ["meta"] sts = ["aws-sdk-sts"] default-provider = ["profile", "imds", "sts", "http-provider"] profile = ["sts", "web-identity-token", "imds", "http-provider"] imds = ["profile", "aws-smithy-http/rt-tokio", "aws-smithy-http-tower", "aws-smithy-json", "tower", "aws-http"] sts = ["aws-sdk-sts", "aws-smithy-http"] web-identity-token = ["sts", "profile"] http-provider = ["aws-smithy-json", "aws-smithy-http/rt-tokio", "tower", "tokio/sync"] tcp-connector = ["tokio/net", "tower"] # SSO is not supported sso = [] rustls = ["aws-smithy-client/rustls"] native-tls = ["aws-smithy-client/native-tls"] rt-tokio = ["aws-smithy-async/rt-tokio"] # Tokio based DNS-resolver for ECS validation dns = ["tokio/rt"] default = ["default-provider", "rustls", "rt-tokio", "dns", "tcp-connector"] default = ["default-provider", "rustls", "rt-tokio", "tcp-connector"] [dependencies] aws-sdk-sts = { path = "../../sdk/build/aws-sdk/sdk/sts", default-features = false, optional = true } Loading @@ -37,7 +29,7 @@ aws-smithy-async = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-async" } aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client" } aws-smithy-types = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-types" } aws-types = { path = "../../sdk/build/aws-sdk/sdk/aws-types" } tokio = { version = "1", features = ["sync"], optional = true } tokio = { version = "1", features = ["sync"] } tracing = { version = "0.1" } # imds Loading Loading @@ -72,3 +64,7 @@ all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] # End of docs.rs metadata [[example]] name = "imds" required-features = ["imds"] aws/rust-runtime/aws-config/additional-ci 0 → 100755 +18 −0 Original line number Diff line number Diff line #!/bin/bash # # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. # # This script contains additional CI checks to run for this specific package set -e echo "### Checking for duplicate dependency versions in the normal dependency graph with all features enabled" cargo tree -d --edges normal --all-features echo "### Testing with all features enabled" cargo test --all-features echo "### Testing each feature in isolation" cargo hack test --each-feature --skip default Loading
.github/workflows/ci-sdk.yaml +33 −39 Original line number Diff line number Diff line Loading @@ -55,19 +55,22 @@ jobs: name: Smoke Test needs: generate-smoke-test runs-on: ubuntu-latest # To avoid repeating setup boilerplate, we have the actual test commands # in a matrix strategy. These commands get run in the steps after all of the setup. strategy: fail-fast: false matrix: test: - name: Unit Tests run: cargo test $(cat service-with-tests) working-directory: aws-sdk - name: Docs run: cargo doc --no-deps --document-private-items working-directory: aws-sdk - name: Clippy run: cargo clippy working-directory: aws-sdk - name: Unused Dependencies run: cargo +nightly udeps - name: Additional per-crate checks run: ../tools/additional-per-crate-checks.sh ./sdk/ env: # Disable incremental compilation to reduce disk space use CARGO_INCREMENTAL: 0 Loading @@ -76,11 +79,29 @@ jobs: # so we have to manually restore the target directory override CARGO_TARGET_DIR: ../target steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.rust_version }} components: ${{ env.rust_toolchain_components }} default: true - uses: actions-rs/toolchain@v1 with: toolchain: nightly default: false - name: Cache cargo bin uses: actions/cache@v2 with: path: ~/.cargo/bin key: ${{ github.job }}-${{ runner.os }}-${{ env.rust_version }} - name: Install additional cargo binaries run: | if [[ ! -f ~/.cargo/bin/cargo-udeps ]]; then cargo +nightly install cargo-udeps fi if [[ ! -f ~/.cargo/bin/cargo-hack ]]; then cargo install cargo-hack fi - name: Generate a name for the SDK id: gen-name run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV Loading @@ -96,47 +117,20 @@ jobs: with: sharedKey: ${{ runner.os }}-${{ env.rust_version }}-${{ github.job }} target-dir: ../target # This runs the commands from the matrix strategy - name: ${{ matrix.test.name }} run: ${{ matrix.test.run }} working-directory: ${{ matrix.test.working-directory }} working-directory: aws-sdk unused-sdk-dependencies: name: Smoke Test - Unused dependencies needs: generate-smoke-test # Psuedo-job that depends on the smoke-test job so that we don't have to enter # the myriad of test matrix combinations into GitHub's protected branch rules require-smoke-tests: needs: smoke-test runs-on: ubuntu-latest name: Smoke Test Matrix Success steps: # Pinned to the commit hash of v1.3.0 - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 with: sharedKey: ${{ runner.os }}-${{ github.job }} target-dir: ../target - uses: actions-rs/toolchain@v1 with: # Cargo udeps requires nightly toolchain: nightly default: true - name: Generate a name for the SDK id: gen-name run: echo "name=${GITHUB_REF##*/}" >> $GITHUB_ENV - uses: actions/download-artifact@v2 name: Download SDK Artifact with: name: aws-sdk-${{ env.name }}-smoketest-${{ github.sha }} path: artifact - name: untar run: mkdir aws-sdk && cd aws-sdk && tar -xvf ../artifact/sdk.tar - name: Install `cargo udeps` run: cargo install cargo-udeps - name: Check for unused dependencies with default features run: cargo udeps working-directory: aws-sdk - name: Check for unused dependencies with `--all-features` run: cargo udeps --all-features working-directory: aws-sdk env: # Note: the .cargo/config.toml is lost because we untar the SDK rather than checking out the repo, # so we have to manually restore the target directory override CARGO_TARGET_DIR: ../target - name: Run run: echo "We should only get this far if the smoke-test matrix succeeded." standalone-integration-tests-check: name: Standalone Integration Tests - cargo check Loading
.github/workflows/ci.yaml +3 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ jobs: codegen-tests: name: Codegen Tests runs-on: ubuntu-latest # To avoid repeating setup boilerplate, we have the actual test commands # in a matrix strategy. These commands get run in the steps after all of the setup. strategy: fail-fast: false matrix: Loading Loading @@ -74,6 +76,7 @@ jobs: uses: actions/setup-java@v1 with: java-version: ${{ env.java_version }} # This runs the commands from the matrix strategy - name: ${{ matrix.test.name }} run: ${{ matrix.test.run }} Loading Loading @@ -113,5 +116,3 @@ jobs: working-directory: ${{ matrix.runtime }}/rust-runtime/ env: RUSTDOCFLAGS: -D warnings - name: Additional per-crate checks run: ./tools/additional-per-crate-checks.sh ${{ matrix.runtime }}/rust-runtime/
CHANGELOG.next.toml +10 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,13 @@ # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false } # author = "rcoh" [[aws-sdk-rust]] message = """ The `meta`, `environment`, and `dns` Cargo feature flags were removed from `aws-config`. The code behind the `dns` flag is now enabled when `rt-tokio` is enabled. The code behind the `meta` and `environment` flags is always enabled now. """ references = ["smithy-rs#961"] meta = { "breaking" = true, "tada" = false, "bug" = false } author = "jdisanti"
aws/rust-runtime/aws-config/Cargo.toml +10 −14 Original line number Diff line number Diff line Loading @@ -9,27 +9,19 @@ license = "Apache-2.0" repository = "https://github.com/awslabs/smithy-rs" [features] default-provider = ["profile", "imds", "meta", "sts", "environment", "http-provider"] profile = ["sts", "web-identity-token", "meta", "environment", "imds", "http-provider"] meta = ["tokio/sync"] imds = ["profile", "aws-smithy-http/rt-tokio", "aws-smithy-http-tower", "aws-smithy-json", "tower", "aws-http", "meta"] environment = ["meta"] sts = ["aws-sdk-sts"] default-provider = ["profile", "imds", "sts", "http-provider"] profile = ["sts", "web-identity-token", "imds", "http-provider"] imds = ["profile", "aws-smithy-http/rt-tokio", "aws-smithy-http-tower", "aws-smithy-json", "tower", "aws-http"] sts = ["aws-sdk-sts", "aws-smithy-http"] web-identity-token = ["sts", "profile"] http-provider = ["aws-smithy-json", "aws-smithy-http/rt-tokio", "tower", "tokio/sync"] tcp-connector = ["tokio/net", "tower"] # SSO is not supported sso = [] rustls = ["aws-smithy-client/rustls"] native-tls = ["aws-smithy-client/native-tls"] rt-tokio = ["aws-smithy-async/rt-tokio"] # Tokio based DNS-resolver for ECS validation dns = ["tokio/rt"] default = ["default-provider", "rustls", "rt-tokio", "dns", "tcp-connector"] default = ["default-provider", "rustls", "rt-tokio", "tcp-connector"] [dependencies] aws-sdk-sts = { path = "../../sdk/build/aws-sdk/sdk/sts", default-features = false, optional = true } Loading @@ -37,7 +29,7 @@ aws-smithy-async = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-async" } aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client" } aws-smithy-types = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-types" } aws-types = { path = "../../sdk/build/aws-sdk/sdk/aws-types" } tokio = { version = "1", features = ["sync"], optional = true } tokio = { version = "1", features = ["sync"] } tracing = { version = "0.1" } # imds Loading Loading @@ -72,3 +64,7 @@ all-features = true targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "docsrs"] # End of docs.rs metadata [[example]] name = "imds" required-features = ["imds"]
aws/rust-runtime/aws-config/additional-ci 0 → 100755 +18 −0 Original line number Diff line number Diff line #!/bin/bash # # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. # # This script contains additional CI checks to run for this specific package set -e echo "### Checking for duplicate dependency versions in the normal dependency graph with all features enabled" cargo tree -d --edges normal --all-features echo "### Testing with all features enabled" cargo test --all-features echo "### Testing each feature in isolation" cargo hack test --each-feature --skip default