[TEST] cross platform setup kat #453
Workflow file for this run
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
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: | |
| - main | |
| - 'feat-*' | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| PACKAGE_NAME: aws-kotlin-repo-tools | |
| RUN: ${{ github.run_id }}-${{ github.run_number }} | |
| jobs: | |
| linux-compat: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Configure JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::934480575838:role/aws-sdk-kotlin-pr-github-oidc-role | |
| aws-region: us-west-2 | |
| - name: Setup Kat | |
| uses: ./.github/actions/setup-kat | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Configure Gradle | |
| uses: ./.github/actions/configure-gradle | |
| - name: Build and Test ${{ env.PACKAGE_NAME }} | |
| run: | | |
| ./gradlew build | |
| macos-compat: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| shell: bash | |
| run: echo "timestamp=$(date +%s)" >> "$GITHUB_OUTPUT" | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Configure JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::934480575838:role/aws-sdk-kotlin-pr-github-oidc-role | |
| aws-region: us-west-2 | |
| - name: Setup Kat | |
| uses: ./.github/actions/setup-kat | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Configure Gradle | |
| uses: ./.github/actions/configure-gradle | |
| - name: Build and Test ${{ env.PACKAGE_NAME }} | |
| run: | | |
| ./gradlew build | |
| - name: Calculate duration | |
| id: end | |
| 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-kotlin-repo-tools | |
| 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 | |
| windows-compat: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Set start timestamp | |
| id: start | |
| shell: bash | |
| run: echo "timestamp=$(date +%s)" >> "$GITHUB_OUTPUT" | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Configure JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::934480575838:role/aws-sdk-kotlin-pr-github-oidc-role | |
| aws-region: us-west-2 | |
| - name: Setup Kat | |
| uses: ./.github/actions/setup-kat | |
| - name: Configure Gradle | |
| uses: ./.github/actions/configure-gradle | |
| - name: Build and Test ${{ env.PACKAGE_NAME }} | |
| run: | | |
| ./gradlew build | |
| - name: Calculate duration | |
| id: end | |
| 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-kotlin-repo-tools | |
| 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 |