Skip to content

Draft: Compose/KMP migration checkpoint, not merge-ready #108

Draft: Compose/KMP migration checkpoint, not merge-ready

Draft: Compose/KMP migration checkpoint, not merge-ready #108

Workflow file for this run

name: PR Checks
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:MaxMetaspaceSize=1g" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- master
paths-ignore:
- '**/*.md'
- 'fastlane/**'
- 'static/**'
- 'captures/**'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Compile + migration safety net (assembleDebug, :shared:desktopTest, strict goldens)
runs-on: ubuntu-latest
timeout-minutes: 30
# S4d-169 (merge of origin/master): adopt master's scaffolding (paths-ignore, workflow_dispatch,
# permissions, concurrency, wrapper validation, setup-android) BUT keep the migration safety net
# (full tests, not master's compile-only `-x test`). The master `if: !github.event.pull_request.draft`
# guard is deliberately DROPPED so Draft PR #358 still runs :shared:desktopTest + the strict watermark
# goldens (the renderer pixel/dim gate the migration depends on).
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper
cache-read-only: ${{ github.event_name == 'pull_request' }}
gradle-home-cache-cleanup: true
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build apk with Gradle
run: ./gradlew :app:assembleDebug
- name: Run :shared multiplatform tests (JVM, CMP plan C1.8)
run: ./gradlew :shared:desktopTest
- name: Run :app unit tests incl. watermark golden (Robolectric NATIVE, CMP plan C1.7/C1.8)
run: ./gradlew :app:testDebugUnitTest
- name: Run STRICT watermark goldens (S4b renderer pixel/dim gate; pins FNV baselines)
# WATERMARK_GOLDEN_STRICT is not a Gradle-tracked input, so a warm cache could otherwise
# serve the prior non-strict :app:testDebugUnitTest result and skip the strict assertions.
# cleanTestDebugUnitTest + --no-build-cache + --rerun-tasks force the strict run to execute.
run: WATERMARK_GOLDEN_STRICT=true ./gradlew :app:cleanTestDebugUnitTest :app:testDebugUnitTest --no-build-cache --rerun-tasks