Skip to content

Cache compiled native libs in preview-apk CI workflow#130

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/cache-compile-core-step
Closed

Cache compiled native libs in preview-apk CI workflow#130
Copilot wants to merge 2 commits intomainfrom
copilot/cache-compile-core-step

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

The "Compile core" step re-runs Rust + NDK compilation on every PR build even when jni/deltachat-core-rust hasn't changed, wasting time unnecessarily.

Changes

  • Capture submodule hash — new step runs git rev-parse HEAD:jni/deltachat-core-rust and exposes it as a step output
  • Cache final build artifactsactions/cache@v4 caches jni/arm64-v8a/ and libs/arm64-v8a/ (the .a and .so files Gradle consumes) with a key derived from:
    • submodule commit hash
    • hashes of Android.mk, Application.mk, dc_wrapper.c, ndk-make.sh
    • NDK version (ndk-r27)
  • Skip compilation on cache hitif: steps.cache-core.outputs.cache-hit != 'true' skips the entire compile step when cached artifacts are valid

On a cache hit the step is bypassed entirely (not just fast); on a miss the outputs are compiled and stored for subsequent runs.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add caching for compile core step in preview-apk.yml Cache compiled native libs in preview-apk CI workflow Mar 11, 2026
@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@adbenitez adbenitez force-pushed the copilot/cache-compile-core-step branch from 6664909 to 429b796 Compare March 11, 2026 16:51
@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@adbenitez adbenitez closed this Mar 11, 2026
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