Skip to content

Commit

Permalink
Try to reformat CI to previous state
Browse files Browse the repository at this point in the history
  • Loading branch information
0marperez committed Apr 24, 2024
1 parent 33d1c39 commit 3c487eb
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/api-compat-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
git fetch origin ${{ github.base_ref }} --depth 1 && \
git diff remotes/origin/${{ github.base_ref }} --numstat "*.api" | awk '
BEGIN { s = 0 }
# git diff numstat shows lines deleted in field 2, hence sum up field 2 across all items
{ s += $2 }
# exit with the number of lines deleted as the result code so that `if failure()` works below
END { exit s }
'
Expand Down
86 changes: 44 additions & 42 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
shell: bash
run: |
./gradlew -Ptest.java.version=${{ matrix.java-version }} jvmTest --stacktrace
all-platforms:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -85,48 +86,49 @@ jobs:
run: |
./gradlew publishToMavenLocal
./gradlew testAllProtocols
downstream:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
path: 'smithy-kotlin'
- name: Checkout tools
uses: actions/checkout@v4
with:
path: 'aws-kotlin-repo-tools'
repository: 'awslabs/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: 'awslabs/aws-sdk-kotlin'
- name: Configure JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
cache: 'gradle'
- name: Build and Test aws-sdk-kotlin downstream
run: |
# TODO - JVM only
cd $GITHUB_WORKSPACE/smithy-kotlin
./gradlew --parallel 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 --parallel publishToMavenLocal
./gradlew test jvmTest
./gradlew testAllProtocols
- name: Checkout sources
uses: actions/checkout@v4
with:
path: 'smithy-kotlin'
- name: Checkout tools
uses: actions/checkout@v4
with:
path: 'aws-kotlin-repo-tools'
repository: 'awslabs/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: 'awslabs/aws-sdk-kotlin'
- name: Configure JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
cache: 'gradle'
- name: Build and Test aws-sdk-kotlin downstream
run: |
# TODO - JVM only
cd $GITHUB_WORKSPACE/smithy-kotlin
./gradlew --parallel 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 --parallel publishToMavenLocal
./gradlew test jvmTest
./gradlew testAllProtocols

0 comments on commit 3c487eb

Please sign in to comment.