Benchmark performance 2026 #357
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
| # Copied and modified from continuous-integration.yml | |
| name: CI w/ reduced Smithy Kotlin | |
| on: | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| concurrency: | |
| group: ci-reduced-pr-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
| jobs: | |
| jvm: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java-version: | |
| - 8 | |
| - 11 | |
| - 17 | |
| - 21 | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT" | |
| - 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: Checkout SDK | |
| uses: actions/checkout@v4 | |
| - name: Configure Gradle (SDK) | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| - name: Checkout smithy-kotlin | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/checkout-head@main | |
| with: | |
| path: 'smithy-kotlin' # '.' would make this a sibling, and include build. Overriding reduced JAR dependency. | |
| repository: 'smithy-lang/smithy-kotlin' | |
| - name: Configure Gradle (Smithy Kotlin) | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main | |
| with: | |
| working-directory: './smithy-kotlin' | |
| # TODO: Replace with kat command (SDK-KT-1089) | |
| - name: Enable JAR reduction & disable Kotlin Native | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/utils/add-to-local-properties@main | |
| with: | |
| working-directory: '~/.sdkdev' | |
| addition: 'aws.kotlin.native = false' | |
| - name: Publish reduced Smithy Kotlin to Maven Local | |
| working-directory: './smithy-kotlin' | |
| run: | | |
| ./gradlew publishToMavenLocal # publish full size and reduced JARs | |
| ./gradlew replaceMavenLocalFullSizeJars # reduce JARs become the default | |
| # The checked out Smithy Kotlin version might be a SNAPSHOT version e.g. in cross repo features (and include builds are off). | |
| - name: Depend on checked out Smithy Kotlin version | |
| run: | | |
| cd ./smithy-kotlin | |
| version=$(kat get-property sdkVersion) | |
| echo "Found Smithy Kotlin version: $version" | |
| cd .. | |
| kat bump-version --file gradle/libs.versions.toml --property smithy-kotlin-version --version $version | |
| - name: Test SDK on JVM (with dependency on reduced Smithy Kotlin) | |
| shell: bash | |
| run: | | |
| ./gradlew -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() | |
| uses: aws/aws-kotlin-repo-tools/.github/actions/emit-metrics@main | |
| with: | |
| namespace: CI Metrics | |
| dimensions: | | |
| Product=aws-sdk-kotlin | |
| JobName=${{ github.job }}(${{ matrix.java-version }})-reduced | |
| 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 | |
| path: '**/build/reports' |