ci: install the Android SDK through one setup-android-sdk action
Summary
TOOL2-5 (refs #4368). The sdkmanager install existed in six copies. They handled the yes SIGPIPE three different ways, and one of them (|| true) hid real licence failures. The build-tools version 36.0.0, which decides the helper APK bytes, was written nine times.
A new composite action, .github/actions/setup-android-sdk, now owns the version through its build-tools input. It exports AGENT_DEVICE_ANDROID_BUILD_TOOLS, outputs build-tools-dir, and installs only when a build-tools binary a caller runs (aapt aapt2 d8 zipalign apksigner) or the platform jar is missing. All six sites call it.
The fixture APK scripts read the exported version. A local repack outside CI uses the newest installed build-tools, and it refuses to run without the version when CI=true.
A repo guard keeps the version and sdkmanager inside the action. 12 files.
Validation
- Tested SHA
819d1dd. check:quickandcheck:fallow --base origin/mainpass, and so do the new guard andtest:fixture-cache(16/16, including build-tools version ordering and a missing SDK).- At
2295200:check:affectedstopped at the 2 known container-onlysmoke-daemon-cleanfailures, and every remaining gate passed when run on its own.819d1ddtouches only the action's readiness check, the repack script and its test. - actionlint is clean on the changed files.
- CI obligations: green runs of
android.yml,size.ymlandtest-app-build-cache.yml(Android leg). release.ymlandrelease-android-snapshot-helper.ymlrun only after merge, so the next release run is their first proof.- Risk: a
workflow_dispatchof the snapshot-helper workflow with acheckout_refolder than this action fails, because the action does not exist at that ref.
Generated by Claude Code
<a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1796966815&installation_model_id=447842&pr_number=4400&ref=codesmith_pr_footer&repository=callstack%2Fagent-device&return_to=https%3A%2F%2Fgithub.com%2Fcallstack%2Fagent-device%2Fpull%2F4400&signature=3c7dbb95da9da01e1adcc23d3c07df48dac44735b450e18e918d560c4e67f04f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28">
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
<a href="https://www.cubic.dev/action/auto-fix/pr/callstack/agent-device/4400?returnTo=https%3A%2F%2Fgithub.com%2Fcallstack%2Fagent-device%2Fpull%2F4400&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg">
Generated by Claude Code