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
48 changes: 48 additions & 0 deletions .github/workflows/codebuild-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Set start timestamp
id: start
run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT"
- name: Verify PRs are not running malicious code
if: ${{ (inputs.aws-sdk-kotlin-pr != '' || inputs.smithy-kotlin-pr != '') && inputs.check-pr == false }}
run: |
Expand All @@ -53,6 +56,8 @@ jobs:
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: Run E2E Tests
id: e2e-tests
uses: aws-actions/aws-codebuild-run-build@v1
Expand All @@ -68,11 +73,33 @@ jobs:
echo "cancelling in-progress build: id=$BUILD_ID"
aws codebuild stop-build --id $BUILD_ID
fi
- 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=aws-sdk-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

service-check-batch-and-artifact-size-metrics:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Set start timestamp
id: start
run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT"
- name: Verify PRs are not running malicious code
if: ${{ (inputs.aws-sdk-kotlin-pr != '' || inputs.smithy-kotlin-pr != '') && inputs.check-pr == false }}
run: |
Expand All @@ -85,6 +112,8 @@ jobs:
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: Run Service Check Batch and Calculate Artifact Size Metrics
Expand Down Expand Up @@ -155,6 +184,25 @@ jobs:
echo If this is expected please add the 'acknowledge-artifact-size-increase' label to this pull request.
exit 1
}
- 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=aws-sdk-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

release-artifact-size-metrics:
if: github.event_name == 'release'
Expand Down
65 changes: 63 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,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:
group: ci-pr-${{ github.ref }}
Expand All @@ -29,6 +30,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
with:
Expand All @@ -39,13 +43,39 @@ jobs:
uses: aws/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
with:
working-directory: ./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: Test
working-directory: ./aws-sdk-kotlin
shell: bash
run: |
pwd
ls -lsa
./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=aws-sdk-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
- name: Save Test Reports
if: failure()
uses: actions/upload-artifact@v4
Expand All @@ -60,12 +90,23 @@ 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
with:
path: 'aws-sdk-kotlin'
- name: Setup Build
uses: ./aws-sdk-kotlin/.github/actions/setup-build
- 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 @@ -99,6 +140,26 @@ jobs:
./gradlew apiCheck
./gradlew test jvmTest
./gradlew testAllProtocols
- 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=aws-sdk-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 Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ksp-version = "2.2.0-2.0.2" # Keep in sync with kotlin-version

dokka-version = "2.0.0"

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

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