Skip to content

ADFA-3253 | Skip llama asset bundling in debug CI builds#1071

Merged
jatezzz merged 3 commits intostagefrom
feat/ADFA-3253-skip-llama-assets-ci
Mar 16, 2026
Merged

ADFA-3253 | Skip llama asset bundling in debug CI builds#1071
jatezzz merged 3 commits intostagefrom
feat/ADFA-3253-skip-llama-assets-ci

Conversation

@jatezzz
Copy link
Collaborator

@jatezzz jatezzz commented Mar 12, 2026

Description

This PR introduces a configurable skipLlamaAssets flag to prevent debug CI builds from triggering llama asset bundling tasks.

The objective is to reduce CI build time by avoiding expensive llama asset generation during debug APK builds while preserving the existing behavior for release builds.

Details

  • Added skipLlamaAssets flag in app/build.gradle.kts
  • Guarded llama bundling dependencies for debug assemble tasks
  • Applied the same condition to lint task wiring
  • Enabled SKIP_LLAMA_ASSETS=true in the debug CI workflow
SKIP_LLAMA_ASSETS=true ./gradlew :app:assembleV8Debug 
Screenshot 2026-03-12 at 1 13 30 PM

Ticket

ADFA-3253

Observation

Release build wiring remains unchanged to ensure bundled llama assets are still generated for release APK packaging. The change only affects debug CI builds.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a8d869f-f077-4e2f-a7a8-459f4ab442a2

📥 Commits

Reviewing files that changed from the base of the PR and between 01d3472 and ca45ae4.

📒 Files selected for processing (1)
  • app/build.gradle.kts
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/build.gradle.kts

📝 Walkthrough
  • Debug CI Workflow Optimization: set SKIP_LLAMA_ASSETS=true in the debug CI job to avoid bundling llama assets during debug CI builds and reduce CI time.
  • Configurable Skip Flag: added a skipLlamaAssets flag in app/build.gradle.kts which reads from SKIP_LLAMA_ASSETS (case-insensitive) or the skipLlamaAssets project property; logs lifecycle info when enabled.
  • Conditional Dependency Wiring: llama asset bundling tasks (bundleLlamaV8Assets, bundleLlamaV7Assets) are now only wired into debug assemble and lint task dependencies when skipLlamaAssets is false.
  • Release Build Preservation: release assemble wiring unchanged — release APKs continue to bundle llama assets by default.
  • Extended noCompress List: expanded noCompressExtensions to include ogg, mp3, mp4, zip, jar, ttf, otf, br, tflite, binarypb, bincfg, conv_model, lstm_model, and related binary extensions.

Risks & Best Practices

  • Build Consistency Risk: CI debug builds will differ from local debug builds unless developers set SKIP_LLAMA_ASSETS=true locally, which can cause environment-specific failures.
  • Functional Testing Risk: debug APKs built with the flag will lack bundled llama assets and may break llama-dependent features; document and restrict such builds for compatibility testing.
  • Scope Concerns: the large expansion of noCompress extensions is unrelated to CI optimization and should be justified or split into a separate PR to keep changes focused.
  • Documentation Gap: no developer-facing guidance included about when/how to set SKIP_LLAMA_ASSETS locally or the implications for debugging and testing.

Walkthrough

Adds a CI environment variable SKIP_LLAMA_ASSETS and a corresponding skipLlamaAssets flag in the Gradle build; makes Llama asset bundling task dependencies conditional on that flag and expands the APK noCompressExtensions list.

Changes

Cohort / File(s) Summary
CI workflow
​.github/workflows/debug.yml
Adds SKIP_LLAMA_ASSETS="true" env var to the build_apk job.
Android build script
app/build.gradle.kts
Introduces skipLlamaAssets sourced from env/project property; logs when enabled; expands noCompressExtensions; converts unconditional dependsOn(bundleLlamaV8Assets)/dependsOn(bundleLlamaV7Assets) (and lint-related task wiring) to conditional execution when skipping Llama assets.

Sequence Diagram(s)

(Skipped — changes are build/config focused and do not introduce a multi-component runtime control-flow requiring sequence visualization.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • hal-eisen-adfa
  • Daniel-ADFA
  • itsaky-adfa

Poem

🐰
I tuck the llama out of sight,
A tiny flag to dim its light.
Builds skip padding, hop along,
Fewer weights, a faster song.
Carrots saved — CI hums bright.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective: skipping llama asset bundling in debug CI builds, which is the primary change across both modified files.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the objective, implementation details, and the rationale for reducing CI build time.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ADFA-3253-skip-llama-assets-ci
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the tone of the review comments and chat replies.

Configure the tone_instructions setting to customize the tone of the review comments and chat replies. For example, you can set the tone to Act like a strict teacher, Act like a pirate and more.

chore: add configurable flag for llama asset dependencies
@jatezzz jatezzz force-pushed the feat/ADFA-3253-skip-llama-assets-ci branch from 904d09a to 0f5441b Compare March 13, 2026 20:27
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/build.gradle.kts`:
- Around line 759-761: The current log message for skipLlamaAssets
(project.logger.lifecycle call) is misleading because it states only debug
assemble tasks are skipped while the lint task wiring is also gated by
skipLlamaAssets; update the lifecycle message to accurately reflect all affected
tasks (e.g., mention both assemble/debug bundling and lint task wiring) so it
clearly communicates the broader behavior controlled by the skipLlamaAssets
flag.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ff3a0746-bd46-4d95-adac-23e3ce36493d

📥 Commits

Reviewing files that changed from the base of the PR and between 8fd63c7 and 01d3472.

📒 Files selected for processing (2)
  • .github/workflows/debug.yml
  • app/build.gradle.kts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/debug.yml

@jatezzz jatezzz merged commit fe4de2b into stage Mar 16, 2026
2 checks passed
@jatezzz jatezzz deleted the feat/ADFA-3253-skip-llama-assets-ci branch March 16, 2026 15:17
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.

3 participants