Update yschimke/compose-ai-tools action to v0.19.18 #2999
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: Android, Wear and JVM CI | |
| on: | |
| pull_request: | |
| # Also run on main so this job SEEDS the BuildFetch remote cache with the debug-variant task | |
| # outputs. Without a main-branch writer building assembleDebug/testDebugUnitTest, PR runs of the | |
| # same target can only reuse whatever overlaps with the release build that publish-android seeds, | |
| # capping the hit rate. Running here on main pushes the debug tasks so PRs hit them. | |
| push: | |
| branches: [main] | |
| # Cancel superseded PR runs; never cancel the main-branch seeding run. | |
| concurrency: | |
| group: android-${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| # BuildFetch remote cache (see settings.gradle.kts). On main-branch pushes this job is a | |
| # writer: ON_CI=true + the read-write token seed the debug-variant task outputs so PR runs of | |
| # this same target get cache hits. On PRs it uses the read-only token with ON_CI=false, so it | |
| # only reads. Absent on fork PRs, which disables the cache there. | |
| BUILDFETCH_GRADLE_REMOTE_CACHE_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.BUILDFETCH_GRADLE_REMOTE_CACHE_TOKEN || secrets.BUILDFETCH_GRADLE_REMOTE_CACHE_TOKEN_RO }} | |
| ON_CI: ${{ github.ref == 'refs/heads/main' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: 'true' | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/gradle-build-action@v3.5.0 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Wear Unit Tests | |
| run: ./gradlew :androidApp:testDebugUnitTest :wearApp:testDebugUnitTest | |
| - name: Build | |
| run: ./gradlew :androidApp:assembleDebug :wearApp:assembleDebug | |
| build-jvm: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| # See build-android: writer (RW token + ON_CI) on main to seed :shared JVM task outputs, | |
| # read-only (RO token) on PRs. | |
| BUILDFETCH_GRADLE_REMOTE_CACHE_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.BUILDFETCH_GRADLE_REMOTE_CACHE_TOKEN || secrets.BUILDFETCH_GRADLE_REMOTE_CACHE_TOKEN_RO }} | |
| ON_CI: ${{ github.ref == 'refs/heads/main' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| - name: Setup Gradle | |
| uses: gradle/gradle-build-action@v3.5.0 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Build | |
| run: ./gradlew :shared:runJvmMain |