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
86 changes: 0 additions & 86 deletions .github/workflows/artifact-size-metrics.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/pull-request-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Pull request metrics
on:
pull_request:

jobs:
artifact-size-metrics:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure Gradle
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main

- name: Build
shell: bash
run: |
./gradlew build --parallel
./gradlew publishAllPublicationsToTestLocalRepository --parallel

- name: Calculate metrics
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/calculate-and-upload@main
with:
upload: 'false'
release_metrics: 'false'

- name: Configure credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2

- name: Process metrics
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/download-and-process@main
with:
download: 'false'

permissions:
id-token: write
contents: read
37 changes: 37 additions & 0 deletions .github/workflows/release-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release metrics

on:
release:
types: [ published ]

jobs:
artifact-size-metrics:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure Gradle
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main

- name: Build
shell: bash
run: |
./gradlew build --parallel
./gradlew publishAllPublicationsToTestLocalRepository --parallel

- name: Configure credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2

- name: Calculate and upload metrics
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/calculate-and-upload@main
with:
upload: 'true'
release_metrics: 'true'

permissions:
id-token: write
contents: read
7 changes: 0 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,12 @@ buildscript {
plugins {
`dokka-convention`
alias(libs.plugins.kotlinx.binary.compatibility.validator)
alias(libs.plugins.aws.kotlin.repo.tools.artifactsizemetrics)
// ensure the correct version of KGP ends up on our buildscript classpath
// since build-plugins also has <some> version in its dependency closure
id(libs.plugins.kotlin.multiplatform.get().pluginId) apply false
id(libs.plugins.kotlin.jvm.get().pluginId) apply false
}

artifactSizeMetrics {
artifactPrefixes = setOf(":runtime")
significantChangeThresholdPercentage = 5.0
projectRepositoryName = "smithy-kotlin"
}

val testJavaVersion = typedProp<String>("test.java.version")?.let {
JavaLanguageVersion.of(it)
}?.also {
Expand Down
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-co
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-version"}
aws-kotlin-repo-tools-kmp = { id = "aws.sdk.kotlin.gradle.kmp", version.ref = "aws-kotlin-repo-tools-version" }
aws-kotlin-repo-tools-smithybuild = { id = "aws.sdk.kotlin.gradle.smithybuild", version.ref = "aws-kotlin-repo-tools-version" }
aws-kotlin-repo-tools-artifactsizemetrics = { id = "aws.sdk.kotlin.gradle.artifactsizemetrics", version.ref = "aws-kotlin-repo-tools-version" }
Loading