Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 122 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
pull_request:
workflow_dispatch:

permissions: { }
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:
Expand All @@ -33,6 +35,9 @@ jobs:
- 17
- 21
steps:
- name: Set start timestamp
id: start
run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT"
- name: Checkout sources
uses: actions/checkout@v4
- name: Configure JDK
Expand All @@ -41,12 +46,38 @@ jobs:
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
- name: Test
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() # 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

all-platforms:
runs-on: ${{ matrix.os }}
Expand All @@ -55,6 +86,10 @@ jobs:
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
- name: Configure JDK
Expand All @@ -63,6 +98,13 @@ jobs:
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
- name: Test
Expand All @@ -71,6 +113,26 @@ jobs:
echo "kotlinWarningsAsErrors=true" >> $GITHUB_WORKSPACE/local.properties
./gradlew apiCheck
./gradlew 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
Expand All @@ -81,6 +143,9 @@ jobs:
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
- name: Configure JDK
Expand All @@ -89,17 +154,46 @@ jobs:
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
- name: Test
shell: bash
run: |
./gradlew publishToMavenLocal
./gradlew 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:
Expand All @@ -118,6 +212,13 @@ jobs:
# 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:
Expand Down Expand Up @@ -149,4 +250,23 @@ jobs:
sed -i "s/smithy-kotlin-codegen-version = .*$/smithy-kotlin-codegen-version = \"$SMITHY_KOTLIN_CODEGEN_VERSION\"/" gradle/libs.versions.toml
./gradlew --parallel publishToMavenLocal
./gradlew test jvmTest
./gradlew testAllProtocols
./gradlew 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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kotlin-version = "2.2.0"
dokka-version = "2.0.0"

aws-kotlin-repo-tools-version = "0.4.57"
aws-kotlin-repo-tools-version = "0.4.58"

# libs
coroutines-version = "1.10.2"
Expand Down
Loading