Skip to content

feat: Kotlin 2.0.0 #3251

feat: Kotlin 2.0.0

feat: Kotlin 2.0.0 #3251

Workflow file for this run

name: '👷 Build → 🧑‍🔬 Test → 🕵️ Lint'
on:
push:
branches: ["main", "hotfix/*", "chore-updated-icons"]
pull_request:
branches: ["main", "hotfix/*", "chore-updated-icons"]
merge_group:
types: [ checks_requested ]
branches: ["main", "hotfix/*", "chore-updated-icons"]
concurrency:
group: '${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/check-git-lfs
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/setup-gradle
- uses: ./.github/actions/setup-gradle-properties
- run: ./gradlew dependencyGuard --quiet
- run: ./gradlew spotlessCheck :build-logic:spotlessCheck
build-test-lint:
name: Build Test Lint [useKSP2=${{ matrix.useKSP2 }}, useK2Uast=${{ matrix.useK2Uast }}]
needs: validation
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
useKSP2: [true, false]
useK2Uast: [true, false]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/setup-gradle
- uses: ./.github/actions/setup-gradle-properties
- name: '👷 Build'
id: build
run: ./gradlew assembleRelease -Pksp.useKSP2=${{ matrix.useKSP2 }} -Pandroid.lint.useK2Uast=${{ matrix.useK2Uast }} -Pandroid.experimental.lint.version=8.5.0-alpha06
- name: '📦 Archive APKs'
uses: actions/upload-artifact@v4
with:
name: apk-${{ matrix.useKSP2 }}-${{ matrix.useK2Uast }}
path: '**/build/outputs/apk/**/*.apk'
- name: '📦 Archive AARs'
uses: actions/upload-artifact@v4
with:
name: aar-${{ matrix.useKSP2 }}-${{ matrix.useK2Uast }}
path: '**/build/outputs/aar'
- name: '📢 Diffuse reports'
if: ${{ always() && github.event_name == 'pull_request' && steps.build.outcome == 'success' }}
uses: ./.github/actions/diffuse-aar
- name: '🧑‍🔬 Test'
id: test
run: ./gradlew globalCiUnitTest verifyPaparazziRelease -Pksp.useKSP2=${{ matrix.useKSP2 }} -Pandroid.lint.useK2Uast=${{ matrix.useK2Uast }} -Pandroid.experimental.lint.version=8.5.0-alpha06
- name: '📦 Archive JUnit reports'
if: ${{ false }}
uses: ./.github/actions/archive-junit-reports
with:
html: '**/build/reports/tests/test*'
xml: '**/build/test-results/test*/**.xml'
- name: '📦 Archive Paparazzi reports'
if: ${{ false }}
uses: ./.github/actions/archive-paparazzi-reports
- name: '📢 Paparazzi report'
if: ${{ failure() && steps.test.outcome == 'failure' && github.event_name == 'pull_request'}}
uses: ./.github/actions/paparazzi-report
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ github.event.pull_request.number }}
- name: '🕵️ Lint'
id: lint
run: ./gradlew lintRelease -Pksp.useKSP2=${{ matrix.useKSP2 }} -Pandroid.lint.useK2Uast=${{ matrix.useK2Uast }} -Pandroid.experimental.lint.version=8.5.0-alpha06
- name: '📦 Archive Lint reports'
if: ${{ false }}
uses: ./.github/actions/archive-lint-reports
with:
analysis: './'
html: '**/build/reports/lint-results-*.html'
sarif: '**/build/reports/lint-results-*.sarif'
xml: '**/build/reports/lint-results-*.xml'
dokka:
needs: validation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/setup-gradle
- uses: ./.github/actions/setup-gradle-properties
- name: '📋 Build Dokka'
# https://github.com/Kotlin/dokka/issues/1217
run: ./gradlew dokkaHtmlMultiModule --no-configuration-cache --no-parallel --max-workers=1
- name: '📦 Archive Dokka'
uses: actions/upload-artifact@v4
with:
name: dokka
path: 'build/dokka'
lava-scan:
needs: validation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: '🌋 Run Lava Vulnerability Scanner'
uses: adevinta/lava-action@f17aca18892d462a617c96f367567c914a3afbe9 # v0
with:
version: latest
config: lava.yaml
- uses: actions/upload-artifact@v4
with:
name: lava-metrics.json
path: metrics.json