chore: bump snapshot version to 1.5.16-SNAPSHOT #4570
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - '*-main' | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| # Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed | |
| concurrency: | |
| group: ci-pr-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RUN: ${{ github.run_id }}-${{ github.run_number }} | |
| GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
| jobs: | |
| jvm: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # we build with a specific JDK version but source/target compatibility should ensure the jar is usable by | |
| # the target versions we want to support | |
| java-version: | |
| - 8 | |
| - 11 | |
| - 17 | |
| - 21 | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT" | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Configure JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Setup kat | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/setup-kat@main | |
| - name: Configure Gradle | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: 'smithy-kotlin' | |
| - name: Build and Test on JVM | |
| working-directory: ./smithy-kotlin | |
| shell: bash | |
| run: | | |
| ./gradlew -Paws.kotlin.native=false -Ptest.java.version=${{ matrix.java-version }} jvmTest --stacktrace | |
| - name: Calculate duration | |
| id: end | |
| if: always() | |
| run: | | |
| printf -v now '%(%s)T' | |
| duration=$(( now - ${{ steps.start.outputs.timestamp }} )) | |
| echo "duration=$duration" >> "$GITHUB_OUTPUT" | |
| - name: Emit metrics | |
| if: always() # run this step even if previous steps failed or the job is canceled | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/emit-metrics@main | |
| with: | |
| namespace: CI Metrics | |
| dimensions: | | |
| Product=smithy-kotlin | |
| JobName=${{ github.job }}(${{ matrix.java-version }}) | |
| Branch=${{ github.base_ref || github.ref_name }} | |
| metrics: | | |
| WorkflowSucceeded:${{ job.status == 'success' && '1' || '0' }}:Count | |
| WorkflowDuration:${{ steps.end.outputs.duration }}:Seconds | |
| # macOS ARM images build and test for targets: jvm, macosArm64, iosSimulatorArm64, watchosSimulatorArm65, tvosSimulatorArm64 | |
| # macos x64 images build and test for targets: jvm, macosX64, iosX64, tvosX64, watchosX64 | |
| macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-15-large # x64 | |
| - macos-15-xlarge # ARM | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Build and Test on Apple platforms | |
| working-directory: ./smithy-kotlin | |
| shell: bash | |
| run: | | |
| # Bump memory profile for Kotlin daemon | |
| cat gradle.properties \ | |
| | sed -r 's/-Xmx[0-9]+G/-Xmx6G/g' \ | |
| | sed -r 's/-XX:MaxMetaspaceSize=[0-9]+G/-XX:MaxMetaspaceSize=2G/g' \ | |
| > gradle.properties2 | |
| mv gradle.properties2 gradle.properties | |
| echo "Modified gradle.properties:" | |
| cat gradle.properties | |
| echo "" | |
| # FIXME K2. Re-enable warnings as errors after this warning is removed: https://youtrack.jetbrains.com/issue/KT-68532 | |
| # echo "kotlinWarningsAsErrors=true" >> $GITHUB_WORKSPACE/local.properties | |
| ./gradlew apiCheck | |
| ./gradlew build | |
| - name: Save Test Reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.os }} | |
| path: '**/build/reports' | |
| # build and test for targets: jvm, linuxX64 | |
| # cross compile for: linuxX64, linuxArm64 | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Configure Gradle | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Configure CRT Docker Images | |
| run: | | |
| ./aws-crt-kotlin/docker-images/build-all.sh | |
| - name: Build and Test on Linux with Cross-Compile | |
| working-directory: ./smithy-kotlin | |
| shell: bash | |
| run: | | |
| # FIXME K2. Re-enable warnings as errors after this warning is removed: https://youtrack.jetbrains.com/issue/KT-68532 | |
| # echo "kotlinWarningsAsErrors=true" >> $GITHUB_WORKSPACE/local.properties | |
| ./gradlew apiCheck | |
| ./gradlew build | |
| - name: Save Test Reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.os }} | |
| path: '**/build/reports' | |
| # windows JVM | |
| windows: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Build and Test on Windows JVM | |
| working-directory: ./smithy-kotlin | |
| run: | | |
| ./gradlew apiCheck | |
| ./gradlew -P"aws.kotlin.native=false" build | |
| - name: Save Test Reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-windows | |
| path: '**/build/reports' | |
| all-platforms: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| shell: bash | |
| run: echo "timestamp=$(date +%s)" >> "$GITHUB_OUTPUT" | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Configure JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Setup kat | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/setup-kat@main | |
| - name: Configure Gradle | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: 'smithy-kotlin' | |
| - name: Test | |
| working-directory: ./smithy-kotlin | |
| shell: bash | |
| run: | | |
| # FIXME K2. Re-enable warnings as errors after this warning is removed: https://youtrack.jetbrains.com/issue/KT-68532 | |
| # echo "kotlinWarningsAsErrors=true" >> $GITHUB_WORKSPACE/local.properties | |
| ./gradlew -Paws.kotlin.native=false apiCheck | |
| ./gradlew -Paws.kotlin.native=false test jvmTest | |
| - name: Calculate duration | |
| id: end | |
| if: always() | |
| shell: bash | |
| run: | | |
| now=$(date +%s) | |
| duration=$(( now - ${{ steps.start.outputs.timestamp }} )) | |
| echo "duration=$duration" >> "$GITHUB_OUTPUT" | |
| - name: Emit metrics | |
| if: always() # run this step even if previous steps failed or the job is canceled | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/emit-metrics@main | |
| with: | |
| namespace: CI Metrics | |
| dimensions: | | |
| Product=smithy-kotlin | |
| JobName=${{ github.job }}(${{ matrix.os }}) | |
| Branch=${{ github.base_ref || github.ref_name }} | |
| metrics: | | |
| WorkflowSucceeded:${{ job.status == 'success' && '1' || '0' }}:Count | |
| WorkflowDuration:${{ steps.end.outputs.duration }}:Seconds | |
| - name: Save Test Reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.os }} | |
| path: '**/build/reports' | |
| protocol-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT" | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Configure JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Setup kat | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/setup-kat@main | |
| - name: Configure Gradle | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: 'smithy-kotlin' | |
| - name: Test | |
| working-directory: ./smithy-kotlin | |
| shell: bash | |
| run: | | |
| ./gradlew -Paws.kotlin.native=false publishToMavenLocal | |
| ./gradlew -Paws.kotlin.native=false testAllProtocols | |
| - name: Calculate duration | |
| id: end | |
| if: always() | |
| run: | | |
| printf -v now '%(%s)T' | |
| duration=$(( now - ${{ steps.start.outputs.timestamp }} )) | |
| echo "duration=$duration" >> "$GITHUB_OUTPUT" | |
| - name: Emit metrics | |
| if: always() # run this step even if previous steps failed or the job is canceled | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/emit-metrics@main | |
| with: | |
| namespace: CI Metrics | |
| dimensions: | | |
| Product=smithy-kotlin | |
| JobName=${{ github.job }} | |
| Branch=${{ github.base_ref || github.ref_name }} | |
| metrics: | | |
| WorkflowSucceeded:${{ job.status == 'success' && '1' || '0' }}:Count | |
| WorkflowDuration:${{ steps.end.outputs.duration }}:Seconds | |
| downstream: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT" | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'smithy-kotlin' | |
| - name: Setup build | |
| uses: ./smithy-kotlin/.github/actions/setup-build | |
| - name: Checkout tools | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'aws-kotlin-repo-tools' | |
| repository: 'aws/aws-kotlin-repo-tools' | |
| ref: '0.2.3' | |
| sparse-checkout: | | |
| .github | |
| - name: Checkout aws-sdk-kotlin | |
| uses: ./aws-kotlin-repo-tools/.github/actions/checkout-head | |
| with: | |
| # smithy-kotlin is checked out as a sibling dir which will automatically make it an included build | |
| path: 'aws-sdk-kotlin' | |
| repository: 'aws/aws-sdk-kotlin' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Setup kat | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/setup-kat@main | |
| - name: Configure Gradle - smithy-kotlin | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: ./smithy-kotlin | |
| - name: Configure Gradle - aws-sdk-kotlin | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: ./aws-sdk-kotlin | |
| - name: Build and Test aws-sdk-kotlin downstream | |
| working-directory: ./smithy-kotlin | |
| run: | | |
| # TODO - JVM only | |
| cd $GITHUB_WORKSPACE/smithy-kotlin | |
| ./gradlew -Paws.kotlin.native=false publishToMavenLocal | |
| SMITHY_KOTLIN_RUNTIME_VERSION=$(grep sdkVersion= gradle.properties | cut -d = -f 2) | |
| SMITHY_KOTLIN_CODEGEN_VERSION=$(grep codegenVersion= gradle.properties | cut -d = -f 2) | |
| cd $GITHUB_WORKSPACE/aws-sdk-kotlin | |
| # replace smithy-kotlin-runtime-version and smithy-kotlin-codegen-version to be | |
| # whatever we are testing such that the protocol test projects don't fail with a | |
| # version that doesn't exist locally or in maven central. Otherwise the generated | |
| # protocol test projects will use whatever the SDK thinks the version of | |
| # smithy-kotlin should be | |
| sed -i "s/smithy-kotlin-runtime-version = .*$/smithy-kotlin-runtime-version = \"$SMITHY_KOTLIN_RUNTIME_VERSION\"/" gradle/libs.versions.toml | |
| sed -i "s/smithy-kotlin-codegen-version = .*$/smithy-kotlin-codegen-version = \"$SMITHY_KOTLIN_CODEGEN_VERSION\"/" gradle/libs.versions.toml | |
| ./gradlew -Paws.kotlin.native=false publishToMavenLocal | |
| ./gradlew -Paws.kotlin.native=false test jvmTest | |
| ./gradlew -Paws.kotlin.native=false testAllProtocols | |
| - name: Calculate duration | |
| id: end | |
| if: always() | |
| run: | | |
| printf -v now '%(%s)T' | |
| duration=$(( now - ${{ steps.start.outputs.timestamp }} )) | |
| echo "duration=$duration" >> "$GITHUB_OUTPUT" | |
| - name: Emit metrics | |
| if: always() # run this step even if previous steps failed or the job is canceled | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/emit-metrics@main | |
| with: | |
| namespace: CI Metrics | |
| dimensions: | | |
| Product=smithy-kotlin | |
| JobName=${{ github.job }} | |
| Branch=${{ github.base_ref || github.ref_name }} | |
| metrics: | | |
| WorkflowSucceeded:${{ job.status == 'success' && '1' || '0' }}:Count | |
| WorkflowDuration:${{ steps.end.outputs.duration }}:Seconds |