Repository navigation
android-cloud-check: RUNS_ON, in-job Android SDK, Kotlin/Native cache - #121
Merged
Merged
Conversation
…ive cache inputs Lets consumers run the Android checks on self-hosted macOS runners whose image has no Android SDK: RUNS_ON picks the runner (default unchanged), ANDROID_SDK_PACKAGES installs the SDK in the job via android-actions/setup-android, KOTLIN_NATIVE_CACHE keeps ~/.konan/dependencies between runs for KMP projects that configure iOS targets on macOS. Measured in futuredapp/tetadrogerie-kmp: lintCheck 6.5 min and tests 1.7 min on an M4 VM vs 19 and 7 min on ubuntu-latest. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9gziD9cVTJLX1oB8ZL73c
Comment on lines
+84
to
+96
| - name: Set up Android SDK | ||
| if: ${{ inputs.ANDROID_SDK_PACKAGES != '' }} | ||
| uses: android-actions/setup-android@v3 | ||
| with: | ||
| packages: ${{ inputs.ANDROID_SDK_PACKAGES }} | ||
| accept-android-sdk-licenses: true | ||
| log-accepted-android-sdk-licenses: false | ||
| - name: Cache Kotlin/Native dependencies | ||
| if: ${{ inputs.KOTLIN_NATIVE_CACHE }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.konan/dependencies | ||
| key: konan-deps-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/libs.versions.toml') }} |
Member
There was a problem hiding this comment.
My spidey sense tells me this should be extracted into actions/android-setup-environment Action
…n/Native cache into the action Review feedback on #121: the SDK install and ~/.konan/dependencies cache were inlined in android-cloud-check.yml, but the action is used by eight jobs and the same steps would be copied into the nightly build next. - android-setup-environment: new optional inputs `android_sdk_packages` (empty = skip) and `kotlin_native_cache` (default 'false'), following the existing java/ruby/gradle toggle pattern. The K/N cache gets a `restore-keys` prefix so a Kotlin bump reuses the previous entry. - android-cloud-check: pass the two workflow inputs through to the action instead of running the steps inline. The workflow still references the action at 2.4.6; the ref gets bumped in the usual follow-up PR once a new tag is cut. Claude-Session: https://claude.ai/code/session_015HbhiukLQv71hkruK31fyT
matejsemancik
approved these changes
Oct 6, 2026
This was referenced Oct 7, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three optional inputs on
android-cloud-check.ymlso a consumer can run the Android lint + test gate on self-hosted macOS runners whose image has no Android SDK. Defaults keep today's behaviour (ubuntu-latest, no SDK step, no K/N cache).Changes
RUNS_ON(string, defaultubuntu-latest): runner label for the job.ANDROID_SDK_PACKAGES(string, default empty): when set,android-actions/setup-android@v3installs the SDK in the job with these packages and accepts the licences.KOTLIN_NATIVE_CACHE(boolean, default false):actions/cacheon~/.konan/dependencies, keyed bylibs.versions.toml- on macOS the KMP toolchain otherwise downloads LLVM + libffi (~1 min) on every fresh runner.Diagram
Job steps with the new optional ones
flowchart LR C["Checkout"] --> E["android-setup-environment<br/>Java · Gradle · Ruby"] E --> S{"ANDROID_SDK_PACKAGES set?"} S -- yes --> SDK["android-actions/setup-android<br/>packages + licences"] --> K S -- no --> K{"KOTLIN_NATIVE_CACHE?"} K -- yes --> KC["actions/cache ~/.konan/dependencies"] --> R K -- no --> R["android-check<br/>lint → tests → Danger"] RO(["runs-on: RUNS_ON<br/>default ubuntu-latest"]) -.-> CNotes
lintCheck6.5 min, unit tests 1.7 min, versus 19 + 7 min onubuntu-latest.platforms;android-37.0, notandroid-37).RUNS_ONonandroid-cloud-nightly-build.yml.🤖 Generated with Claude Code