Skip to content

ci(android): reduce APK guardrail runtime#394

Merged
ucguy4u merged 2 commits into
mainfrom
codex/issue-253-apk-size-actions
Jun 27, 2026
Merged

ci(android): reduce APK guardrail runtime#394
ucguy4u merged 2 commits into
mainfrom
codex/issue-253-apk-size-actions

Conversation

@ucguy4u

@ucguy4u ucguy4u commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR reduces routine GitHub Actions runtime while preserving required release and security guardrails for issue #253.

Goal: prevent accidental APK/model bloat and avoid spending PR build time on the known-heavy full Android variant unless it is explicitly requested.

Core outcome:

  • mobile-full Android APK builds are skipped on PRs by default and run when the PR has the full-android-build label.
  • Streaming and TV Android APK size guardrails remain active on PRs.
  • Large bundled model artifacts are blocked in release-bearing app/package paths.

Changes

Code

  • Added scripts/check-bundled-model-artifacts.sh and regression coverage.
  • Updated scripts/check-apk-size.sh to include largest APK entries in reports.
  • Added runtime model delivery and size guardrail documentation.

CI

  • Added manual dispatch support to ci.yml, including build_full_android control.
  • Wired the model artifact guardrail into PR checks and CI analysis.
  • Made IPTV sanity and smoke tests manual-only to reduce nonessential Actions usage.
  • Kept security scans, lint, PR checks, core tests, and lean APK guardrails enabled.

Risks

  • Full Android APK regressions on PRs are now report-on-demand unless the PR is labeled full-android-build; push-to-main still runs the full matrix.
  • IPTV and smoke workflows no longer run automatically; they must be triggered manually while Actions spend is being controlled.

Rollback plan:

  • Re-enable the removed workflow triggers or remove the mobile-full skip gate from ci.yml.

Testing

  • scripts/test-check-bundled-model-artifacts.sh
  • scripts/test-check-apk-size.sh
  • scripts/test-check-module-sizes.sh
  • scripts/check-bundled-model-artifacts.sh
  • ruby -e 'require "yaml"; ARGV.each { |f| YAML.load_file(f); puts "OK #{f}" }' .github/workflows/ci.yml .github/workflows/pr-checks.yml .github/workflows/iptv_sanity.yml .github/workflows/smoke-tests.yml
  • bash -n scripts/check-bundled-model-artifacts.sh scripts/test-check-bundled-model-artifacts.sh scripts/check-apk-size.sh scripts/test-check-apk-size.sh
  • git diff --check

Closes #253 only after the full APK footprint is brought under the production target; this PR is a guardrail/runtime reduction step under that issue.

- skip mobile-full Android builds on PRs unless explicitly labeled
- add bundled model artifact guardrail for release-bearing paths
- document runtime model delivery and APK size investigation policy
- keep lean Android size checks and security workflows enabled

Reduces routine Actions time while protecting release bundle size.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Quick Check Summary

Check Status Description
PR Validation ✅ success Title format, docs, bundled model guardrail
Code Quality ✅ success Analyze, formatting
Core Tests ✅ success Core package unit tests

💡 Note: Full app tests, coverage reports, and security scans run on merge to main.

View Details

Avoid sort-to-head broken pipe failures under bash pipefail when limiting APK report entries.

Keeps the largest-entry APK report while allowing lean Android size checks to complete.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Quick Check Summary

Check Status Description
PR Validation ✅ success Title format, docs, bundled model guardrail
Code Quality ✅ success Analyze, formatting
Core Tests ✅ success Core package unit tests

💡 Note: Full app tests, coverage reports, and security scans run on merge to main.

View Details

@ucguy4u ucguy4u merged commit 132b0bf into main Jun 27, 2026
20 checks passed
@ucguy4u ucguy4u deleted the codex/issue-253-apk-size-actions branch June 27, 2026 03:08
@sonarqubecloud

Copy link
Copy Markdown

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.

Optimize full Android app native AI footprint before production release

1 participant