Skip to content

Conversation

@FranAguilera
Copy link
Contributor

@FranAguilera FranAguilera commented Jul 21, 2025

What

Relying on uses: actions/cache/save@v3 seems flaky as often times we can get errors like

image

Proposal here is to store the size on a file under ci directory

NOTE: As a follow up will handle aar size via script https://github.com/bitdriftlabs/capture-sdk/pull/378/files

Verification

Run without main check by commenting locally if: github.ref == 'refs/heads/main' && success() so we can have the size being store logic run.

@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch from cf199d8 to 0caddf6 Compare July 21, 2025 09:46
@FranAguilera FranAguilera requested review from kattrali and murki July 21, 2025 09:54
@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch 3 times, most recently from 337fc21 to a18b36a Compare July 21, 2025 09:56
@FranAguilera FranAguilera marked this pull request as ready for review July 21, 2025 09:57
@bitdriftlabs bitdriftlabs deleted a comment from github-actions bot Jul 21, 2025
@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch from 4659ed4 to f7546bc Compare July 21, 2025 10:43
@FranAguilera FranAguilera marked this pull request as draft July 21, 2025 10:46
@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch 2 times, most recently from 75b7c9b to 500cc0d Compare July 21, 2025 13:46
@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch from 500cc0d to da8fe5f Compare July 21, 2025 14:19
cp ./bazel-bin/examples/android/android_app.apk bazel_apk_baseline/
APK_PATH=$(find bazel-bin/examples/android -name "android_app.apk" | head -n 1)
SIZE_FILE=ci/hello_world_bazel_x86_64_main_size.txt
stat -c%s "$APK_PATH" > "$SIZE_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

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

could we take advantage of the effort you're putting revisiting all this and compute the aar / so size instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

totally, will explore. My main concern is increased build time but i can try to optimize other places

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think building the aar with a stripped so in parallel should be what we use to measure

Copy link
Contributor

Choose a reason for hiding this comment

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

you can add it as a pre-step for Build Bazel APK and then I think you can use the generated aar for the //examples/android:android_app apk generation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

perfect, will do as a follow up (had this already wip https://github.com/bitdriftlabs/capture-sdk/pull/378/files)

will be merging this soon (after more verification), to prevent broken state on main with that caching issue

github-actions[bot]

This comment was marked as off-topic.

@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch from ba7e4c4 to 6a2e95e Compare July 21, 2025 14:57
github-actions[bot]

This comment was marked as off-topic.

@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch 2 times, most recently from 792c8cd to 913f2ca Compare July 21, 2025 15:47
@bitdriftlabs bitdriftlabs deleted a comment from github-actions bot Jul 21, 2025
@FranAguilera FranAguilera force-pushed the franjam/apk-size-improvements branch from 913f2ca to c2a4fc4 Compare July 21, 2025 16:09
@bitdriftlabs bitdriftlabs deleted a comment from github-actions bot Jul 21, 2025
@bitdriftlabs bitdriftlabs deleted a comment from github-actions bot Jul 21, 2025
@FranAguilera FranAguilera marked this pull request as ready for review July 21, 2025 16:11
@FranAguilera FranAguilera enabled auto-merge (squash) July 21, 2025 16:11
@github-actions
Copy link

📦 Bazel APK(x86_64) Size Report

Metric Size (KB)
Baseline 3393
Current 3393
Difference 0

✅ Bazel APK(x86_64) size unchanged.

@FranAguilera FranAguilera merged commit 0841bb6 into main Jul 21, 2025
14 checks passed
@FranAguilera FranAguilera deleted the franjam/apk-size-improvements branch July 21, 2025 16:34
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants