Unverified Commit e494fb58 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Stop cloning `aws-doc-sdk-examples` repository in CI (#4300)

parents 12da47b1 1ea5fe12
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -69,11 +69,6 @@ jobs:
      with:
        repository: awslabs/aws-sdk-rust
        path: aws-sdk-rust
    # The examples from aws-doc-sdk-examples are needed to see if smithy-rs changes break examples
    - uses: actions/checkout@v4
      with:
        repository: awsdocs/aws-doc-sdk-examples
        path: aws-doc-sdk-examples
    - name: Run ${{ matrix.actions.action }}
      uses: ./smithy-rs/.github/actions/docker-build
      with:
+2 −2
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ internal class AwsCrateDocGenerator(private val codegenContext: ClientCodegenCon
                #### Getting Started

                > Examples are available for many services and operations, check out the
                > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
                > [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).

                The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
                as a dependency within your Rust project to execute asynchronous code. To add `$moduleName` to
@@ -209,7 +209,7 @@ internal class AwsCrateDocGenerator(private val codegenContext: ClientCodegenCon
                * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
                * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
                * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
                * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)${"\n"}
                * [Usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)${"\n"}
                """.trimIndent(),
            )

+1 −1
Original line number Diff line number Diff line
[package]
name = "aws-config"
version = "1.8.6"
version = "1.8.7"
authors = [
    "AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
    "Russell Cohen <rcoh@amazon.com>",
+2 −3
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ async fn example() {

## Getting Started

_Examples are available for many services and operations, check out the [examples folder in GitHub][Usage examples]._
_Examples are available for many services and operations, check out the [Usage examples]._

The SDK provides one crate per AWS service. You must add [Tokio] as a dependency within your Rust project to execute asynchronous code. To add aws-sdk-config to your project, add the following to your Cargo.toml file where VERSION is the version of the SDK you want to use:

@@ -58,13 +58,12 @@ Suggestions for additional sections or improvements for the guide are welcome. P

This project is licensed under the Apache-2.0 License.

[examples folder in GitHub]: https://github.com/awslabs/aws-sdk-rust/tree/main/examples
[Tokio]: https://crates.io/crates/tokio
[Guide]: https://github.com/awslabs/aws-sdk-rust/blob/main/Guide.md
[GitHub discussions]: https://github.com/awslabs/aws-sdk-rust/discussions
[GitHub issues]: https://github.com/awslabs/aws-sdk-rust/issues/new/choose
[Generated Docs]: https://awslabs.github.io/aws-sdk-rust/
[Usage examples]: https://github.com/awslabs/aws-sdk-rust/tree/main/examples
[Usage examples]: https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1

<!-- anchor_start:footer -->
This crate is part of the [AWS SDK for Rust](https://awslabs.github.io/aws-sdk-rust/) and the [smithy-rs](https://github.com/smithy-lang/smithy-rs) code generator.
+0 −50
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ val awsRustRuntimePath = rootProject.projectDir.resolve("aws/rust-runtime")
val awsSdkPath = rootProject.projectDir.resolve("aws/sdk")
val outputDir = layout.buildDirectory.dir("aws-sdk").get()
val sdkOutputDir = outputDir.dir("sdk")
val examplesOutputDir = outputDir.dir("examples")
val checkedInSdkLockfile = rootProject.projectDir.resolve("aws/sdk/Cargo.lock")
val generatedSdkLockfile = outputDir.file("Cargo.lock")

@@ -110,7 +109,6 @@ fun generateSmithyBuild(services: AwsServices): String {
                        "moduleVersion": "${crateVersioner.decideCrateVersion(moduleName, service)}",
                        "moduleAuthors": ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"],
                        "moduleDescription": "${service.moduleDescription}",
                        ${service.examplesUri(project)?.let { """"examples": "$it",""" } ?: ""}
                        "moduleRepository": "https://github.com/awslabs/aws-sdk-rust",
                        "license": "Apache-2.0",
                        "minimumSupportedRustVersion": "${getRustMSRV()}",
@@ -192,30 +190,6 @@ tasks.register("relocateServices") {
    outputs.dir(sdkOutputDir)
}

tasks.register("relocateExamples") {
    description = "relocate the examples folder & rewrite path dependencies"
    dependsOn("jar")

    doLast {
        if (awsServices.examples.isNotEmpty()) {
            copy {
                from(projectDir)
                awsServices.examples.forEach { example ->
                    include("$example/**")
                }
                into(outputDir)
                exclude("**/target")
                exclude("**/rust-toolchain.toml")
                filter { line -> line.replace("build/aws-sdk/sdk/", "sdk/") }
            }
        }
    }
    if (awsServices.examples.isNotEmpty()) {
        inputs.dir(projectDir.resolve("examples"))
    }
    outputs.dir(outputDir)
}

tasks.register("relocateTests") {
    description = "relocate the root integration tests and rewrite path dependencies"
    dependsOn("jar")
@@ -240,24 +214,6 @@ tasks.register("relocateTests") {
    outputs.dir(outputDir)
}

tasks.register<ExecRustBuildTool>("fixExampleManifests") {
    description = "Adds dependency path and corrects version number of examples after relocation"
    enabled = awsServices.examples.isNotEmpty()
    dependsOn("relocateExamples")

    toolPath = sdkVersionerToolPath
    binaryName = "sdk-versioner"
    arguments = listOf(
        "use-path-and-version-dependencies",
        "--sdk-path", sdkOutputDir.asFile.absolutePath,
        "--versions-toml", outputDir.file("versions.toml").asFile.absolutePath,
        outputDir.dir("examples").asFile.absolutePath,
    )

    outputs.dir(outputDir)
    dependsOn("relocateExamples", "generateVersionManifest")
}

/**
 * The aws/rust-runtime crates depend on local versions of the Smithy core runtime enabling local compilation. However,
 * those paths need to be replaced in the final build. We should probably fix this with some symlinking.
@@ -336,9 +292,6 @@ tasks.register("generateCargoWorkspace") {
        rootProject.rootDir.resolve("clippy-root.toml").copyTo(outputDir.file("clippy.toml").asFile, overwrite = true)
    }
    inputs.property("servicelist", awsServices.moduleNames.toString())
    if (awsServices.examples.isNotEmpty()) {
        inputs.dir(projectDir.resolve("examples"))
    }
    for (test in awsServices.rootTests) {
        inputs.dir(test.path)
    }
@@ -352,7 +305,6 @@ tasks.register<ExecRustBuildTool>("fixManifests") {
    dependsOn("relocateServices")
    dependsOn("relocateRuntime")
    dependsOn("relocateAwsRuntime")
    dependsOn("relocateExamples")
    dependsOn("relocateTests")

    inputs.dir(publisherToolPath)
@@ -428,12 +380,10 @@ tasks.assemble.configure {
        "relocateServices",
        "relocateRuntime",
        "relocateAwsRuntime",
        "relocateExamples",
        "relocateTests",
        "generateIndexMd",
        "fixManifests",
        "generateVersionManifest",
        "fixExampleManifests",
        "hydrateReadme",
        "relocateChangelog",
    )
Loading