Skip to content

Update Kotlin and compiler plugins #3338

Update Kotlin and compiler plugins

Update Kotlin and compiler plugins #3338

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
jobs:
cancel-previoius-runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
validate-wrapper:
runs-on: ubuntu-latest
steps:
- name: check out
uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
build-logic:
needs: validate-wrapper
strategy:
fail-fast: false
matrix:
runner: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.runner }}-latest
steps:
- name: check out
uses: actions/checkout@v4
- name: build build-logic
uses: ./.github/actions/gradle-task
with:
task: jar compileKotlin
write-cache-key: build-logic-artifacts
build-all:
needs: build-logic
strategy:
fail-fast: false
matrix:
runner: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.runner }}-latest
steps:
- name: check out
uses: actions/checkout@v4
- name: main build
uses: ./.github/actions/gradle-task
with:
task: jar compileKotlin
write-cache-key: main-build-artifacts
restore-cache-key: build-logic-artifacts
ktlint:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: ktlint
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: ktlintFormat
check-task: ktlintCheck
ci-matrices:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: ci-matrices
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: versionsMatrixYamlUpdate unitTestShardMatrixYamlUpdate
check-task: versionsMatrixYamlCheck unitTestShardMatrixYamlCheck
dependency-guard:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: dependency-guard
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: dependencyGuardBaseline
check-task: dependencyGuard
moduleCheck:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: moduleCheck
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: moduleCheckAuto
check-task: moduleCheck
doks:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: doks
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: doks
check-task: doksCheck
website-versioning:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: website versioning
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: updateWebsiteNextDocsVersionRefs updateWebsitePackageJsonVersion updateWebsiteChangelog
check-task: checkWebsiteNextDocsVersionRefs checkWebsitePackageJsonVersion
artifacts-check:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: artifacts-check
uses: ./.github/actions/gradle-task-with-commit
with:
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fix-task: artifactsDump
check-task: artifactsCheck
check-version-is-snapshot:
runs-on: ubuntu-latest
needs: build-logic
steps:
- uses: actions/checkout@v4
- name: check version is snapshot
uses: ./.github/actions/gradle-task
with:
task: checkVersionIsSnapshot
detekt:
runs-on: macos-latest
needs: build-all
steps:
- uses: actions/checkout@v4
- name: detektAll
uses: ./.github/actions/gradle-task
with:
task: detektAll
restore-cache-key: main-build-artifacts
- name: merge detekt SARIF reports
run: ./gradlew detektReportMerge
- name: Upload SARIF to Github using the upload-sarif action
uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
with:
sarif_file: build/reports/detekt/merged.sarif
build-website:
runs-on: macos-latest
needs: build-all
steps:
- name: check out
uses: actions/checkout@v4
- name: dokkaHtmlMultiModule
uses: ./.github/actions/gradle-task
with:
task: dokkaHtmlMultiModule
restore-cache-key: main-build-artifacts
write-cache-key: dokka-build-artifacts
- name: website build cache
uses: actions/cache@v3
with:
path: |
website/.docusaurus
website/build
website/node_modules
key: website-build
enableCrossOsArchive: true
# Node is required for npm
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: website/yarn.lock
- name: Install Yarn
working-directory: website
run: yarn install --frozen-lockfile
- name: build website
uses: ./.github/actions/gradle-task
with:
task: buildSite
write-cache-key: website-build
- name: knit check
run: ./gradlew knitCheck
unit-tests:
needs: build-all
strategy:
fail-fast: false
matrix:
runner: [ ubuntu, windows ]
### <start-unit-test-shards>
shardNum: [ 1, 2, 3, 4 ]
### <end-unit-test-shards>
runs-on: ${{ matrix.runner }}-latest
steps:
- name: check out
uses: actions/checkout@v4
- name: unit tests
uses: ./.github/actions/gradle-task
with:
task: testShard${{ matrix.shardNum }}
restore-cache-key: main-build-artifacts
- name: Archive test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results
path: ${{ github.workspace }}/**/build/reports/tests/
- name: Unit test results
uses: mikepenz/action-junit-report@v4
if: failure()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/**/TEST-*.xml'
check_name: Unit Test Results - ${{runner.os}}
integration-tests-ubuntu:
needs: build-all
strategy:
fail-fast: false
### <start-versions-matrix>
matrix:
kotlin-version: [ 1.8.0, 1.8.10, 1.8.22 ]
gradle-version: [ 7.6.1, 8.0.2, 8.1.1 ]
agp-version: [ 7.3.1, 8.0.2, 8.1.0 ]
anvil-version: [ 2.4.6 ]
exclude:
- gradle-version: 8.1.1
agp-version: 7.3.1
- gradle-version: 7.6.1
agp-version: 8.0.2
- gradle-version: 7.6.1
agp-version: 8.1.0
### <end-versions-matrix>
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: integration-tests
uses: ./.github/actions/gradle-task
with:
task: |
integrationTest
-Pmodulecheck.gradleVersion=${{ matrix.gradle-version }}
-Pmodulecheck.agpVersion=${{ matrix.agp-version }}
-Pmodulecheck.kotlinVersion=${{ matrix.kotlin-version }}
-Pmodulecheck.anvilVersion=${{ matrix.anvil-version }}
-Pmodulecheck.exhaustive=false
restore-cache-key: main-build-artifacts
- name: Unit test results
uses: mikepenz/action-junit-report@v4
if: failure()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/**/TEST-*.xml'
check_name: Integration Test Results
integration-tests-windows:
needs: build-all
strategy:
fail-fast: false
matrix:
### <start-integration-test-shards>
shardNum: [ 1, 2, 3, 4, 5, 6 ]
### <end-integration-test-shards>
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: integration-tests-windows
uses: ./.github/actions/gradle-task
with:
task: integrationTestShard${{ matrix.shardNum }} -Pmodulecheck.exhaustive=false
restore-cache-key: main-build-artifacts
- name: Archive integration test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: integration-test-results-windows
path: ${{ github.workspace }}/**/build/reports/tests/
- name: Integration test results
uses: mikepenz/action-junit-report@v4
if: failure()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/**/TEST-*.xml'
check_name: Integration Test Results - Windows
all-checks:
if: always()
runs-on: ubuntu-latest
needs:
- artifacts-check
- build-website
- check-version-is-snapshot
- ci-matrices
- dependency-guard
- detekt
- doks
- integration-tests-ubuntu
- integration-tests-windows
- ktlint
- moduleCheck
- unit-tests
- validate-wrapper
- website-versioning
steps:
- name: require that all other jobs have passed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}