Skip to content

CI: cache Maven, Gradle, CocoaPods and bump action versions#4834

Merged
shai-almog merged 1 commit intomasterfrom
ci-cache-and-action-bumps
Apr 30, 2026
Merged

CI: cache Maven, Gradle, CocoaPods and bump action versions#4834
shai-almog merged 1 commit intomasterfrom
ci-cache-and-action-bumps

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Summary

Reduces CI run time (especially on macOS runners) by caching dependency downloads that were previously refetched on every build, and bumps several workflows off deprecated actions/checkout@v1/@v2 and actions/setup-java@v1.

No coverage changes — every test that runs today still runs.

Changes per workflow

  • scripts-ios.yml, scripts-ios-native.yml, ios-packaging.yml

    • Cache ~/.m2/repository (was missed — setup-workspace.sh was redownloading every Maven dep on every run).
    • Cache ~/Library/Caches/CocoaPods, ~/.cocoapods/repos, and ~/.gem so CocoaPods spec mirror and the cocoapods/xcodeproj gems persist.
    • Skip gem install cocoapods xcodeproj when pod is already on PATH from the restored cache.
  • scripts-android.yml

    • Cache ~/.m2/repository and ~/.gradle/{caches,wrapper}.
    • Caches are matrix-keyed (matrix.id) so JDK 8 / 17 / 21 rows don't pollute each other.
  • pr.yml

    • actions/checkout@v1@v4 (v1 doesn't shallow-clone and is significantly slower).
  • ant.yml

    • actions/checkout@v1@v4.
    • actions/setup-java@v1@v4 with cache: 'maven' (was missing entirely).
    • Kept as-is otherwise — this workflow runs tests/all.sh and maven/integration-tests/all.sh (archetype roundtrip, kotlin app, googlemaps demo, native interfaces, css fonts, migrations) which aren't covered elsewhere.
  • designer.yml

    • actions/setup-java@v1@v4 with cache: 'maven'.
    • Cache ../cn1-binaries; skip the wget master.zip + unzip on cache hit.
  • release-on-maven-central.yml

    • actions/checkout@v2@v4, actions/setup-java@v1@v4 with cache: 'maven'.

Cache key strategy

  • Maven repo: keyed on hashFiles('**/pom.xml') with a prefix restore-keys fallback so partial restores still help when poms change.
  • Gradle: keyed on build.gradle* + wrapper hashes; matrix-scoped on Android.
  • CocoaPods/gems: keyed on setup-workspace.sh hash — stable across builds since the gem versions don't drift.
  • All caches scope by runner.os so Linux and macOS warm independently.

Expected savings (rough, after first warm run)

Workflow Estimated saving
iOS workflows (×3) ~5–8 min/run each
Android (×3 matrix) ~3–4 min/run each
Designer ~2–3 min/run
ant.yml ~3–5 min/run
Release deploy ~3–5 min/run

Test plan

  • Verify all 8 modified workflows parse (done locally with yaml.safe_load).
  • First push: caches will be cold — runs should still pass, just at current speed.
  • Second push: confirm Cache restored from key: lines appear in step logs and step durations drop.
  • Confirm Android matrix rows don't share cache (each matrix.id should write its own key).
  • Confirm CocoaPods cache hit skips gem install (look for pod --version succeeding without a preceding install).

🤖 Generated with Claude Code

Caches dependency downloads that were previously refetched on every
run, and updates several workflows from deprecated checkout@v1/v2 and
setup-java@v1 to v4 (with built-in Maven cache).

- iOS workflows (scripts-ios, scripts-ios-native, ios-packaging):
  cache ~/.m2/repository and ~/Library/Caches/CocoaPods + user gems;
  skip the cocoapods gem install on cache hit.
- scripts-android: cache ~/.m2/repository and ~/.gradle/{caches,wrapper},
  matrix-keyed so JDK 8/17/21 rows don't fight over the same cache.
- pr.yml: checkout@v1 -> v4.
- ant.yml: checkout@v1 -> v4, setup-java@v1 -> v4 with cache: 'maven'.
- designer.yml: setup-java@v1 -> v4 with cache: 'maven'; cache
  cn1-binaries and skip the wget+unzip on cache hit.
- release-on-maven-central.yml: checkout@v2 -> v4, setup-java@v1 -> v4
  with cache: 'maven'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Copy Markdown
Collaborator

shai-almog commented Apr 30, 2026

Compared 85 screenshots: 85 matched.

Native Android coverage

  • 📊 Line coverage: 9.71% (5265/54213 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 7.63% (25855/338985), branch 3.48% (1133/32520), complexity 4.51% (1405/31156), method 7.88% (1148/14561), class 12.89% (251/1948)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 9.71% (5265/54213 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 7.63% (25855/338985), branch 3.48% (1133/32520), complexity 4.51% (1405/31156), method 7.88% (1148/14561), class 12.89% (251/1948)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 888.000 ms
Base64 CN1 encode 142.000 ms
Base64 encode ratio (CN1/native) 0.160x (84.0% faster)
Base64 native decode 771.000 ms
Base64 CN1 decode 203.000 ms
Base64 decode ratio (CN1/native) 0.263x (73.7% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog
Copy link
Copy Markdown
Collaborator

shai-almog commented Apr 30, 2026

Compared 85 screenshots: 85 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 216 seconds

Build and Run Timing

Metric Duration
Simulator Boot 101000 ms
Simulator Boot (Run) 1000 ms
App Install 13000 ms
App Launch 28000 ms
Test Execution 289000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1477.000 ms
Base64 CN1 encode 1675.000 ms
Base64 encode ratio (CN1/native) 1.134x (13.4% slower)
Base64 native decode 903.000 ms
Base64 CN1 decode 1288.000 ms
Base64 decode ratio (CN1/native) 1.426x (42.6% slower)
Base64 SIMD encode 514.000 ms
Base64 encode ratio (SIMD/native) 0.348x (65.2% faster)
Base64 encode ratio (SIMD/CN1) 0.307x (69.3% faster)
Base64 SIMD decode 580.000 ms
Base64 decode ratio (SIMD/native) 0.642x (35.8% faster)
Base64 decode ratio (SIMD/CN1) 0.450x (55.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 117.000 ms
Image createMask (SIMD on) 19.000 ms
Image createMask ratio (SIMD on/off) 0.162x (83.8% faster)
Image applyMask (SIMD off) 214.000 ms
Image applyMask (SIMD on) 84.000 ms
Image applyMask ratio (SIMD on/off) 0.393x (60.7% faster)
Image modifyAlpha (SIMD off) 217.000 ms
Image modifyAlpha (SIMD on) 111.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.512x (48.8% faster)
Image modifyAlpha removeColor (SIMD off) 200.000 ms
Image modifyAlpha removeColor (SIMD on) 123.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.615x (38.5% faster)
Image PNG encode (SIMD off) 1441.000 ms
Image PNG encode (SIMD on) 1287.000 ms
Image PNG encode ratio (SIMD on/off) 0.893x (10.7% faster)
Image JPEG encode 742.000 ms

@shai-almog shai-almog merged commit c7a9b35 into master Apr 30, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants