[PR #6583] [MERGED] [PM-32758] ci: Improve CI cache to fix GitHub runners running out of memory #48297

Closed
opened 2026-04-26 15:54:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6583
Author: @vvolkgang
Created: 2/25/2026
Status: Merged
Merged: 2/25/2026
Merged by: @vvolkgang

Base: mainHead: vvolkgang/cache-size


📝 Commits (7)

  • db69252 Remove buildCache path override
  • 425a3e8 Use gradle/actions/setup-gradle in setup-android-build action
  • a064017 Apply setup-android-build action to build-testharness.yml
  • 6ce739a Increase gradle heap size to address build log -
  • bd0264c Apply setup-android-build action to remaining workflows
  • 3d8c2f2 Update test workflow on push branches to include release branches
  • 39d4836 Remove test code

📊 Changes

7 files changed (+20 additions, -297 deletions)

View changed files

📝 .github/actions/setup-android-build/action.yml (+2 -21)
📝 .github/workflows/build-authenticator.yml (+5 -76)
📝 .github/workflows/build-testharness.yml (+2 -39)
📝 .github/workflows/build.yml (+6 -112)
📝 .github/workflows/test.yml (+4 -41)
📝 gradle.properties (+1 -1)
📝 settings.gradle.kts (+0 -7)

📄 Description

🎟️ Tracking

PM-32758

📔 Objective

Fix GitHub runners running out of memory by replacing our cache approach with setup-gradle action. This action comes with a sensible set of default settings following best practices, worth nothing:

  • Cache cleanup
  • Restricted write - defaults to main branches only, mitigating cache poisoning and useful caches from main being replaced by feature branch caches that aren't useful for others, slowing down all runs.

While at it:

  1. Consolidated everything into our setup-andoid-build reusable action
  2. Removed local build-cache path override from settings.gradle.kts. Gradle's default cache location is used instead.
  3. Increased Gradle heap size from 4g to 6g based on the Post setup-gradle action logs, mentioning "cache misses" due to low memory. Test runs - before | after
  4. Test workflow was updated to run on release branches in addition to main.

Test Runs (forced to write cache):


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6583 **Author:** [@vvolkgang](https://github.com/vvolkgang) **Created:** 2/25/2026 **Status:** ✅ Merged **Merged:** 2/25/2026 **Merged by:** [@vvolkgang](https://github.com/vvolkgang) **Base:** `main` ← **Head:** `vvolkgang/cache-size` --- ### 📝 Commits (7) - [`db69252`](https://github.com/bitwarden/android/commit/db692523af0189629a7f80082772d524b31354ab) Remove buildCache path override - [`425a3e8`](https://github.com/bitwarden/android/commit/425a3e8a7a4f6e0a69711e0e1f23cccbdc7fc368) Use gradle/actions/setup-gradle in setup-android-build action - [`a064017`](https://github.com/bitwarden/android/commit/a0640171e8a000e727821eea874dcfd67065b69c) Apply setup-android-build action to build-testharness.yml - [`6ce739a`](https://github.com/bitwarden/android/commit/6ce739a2fb2b7910c83ee7ec8ddca0675a0b7497) Increase gradle heap size to address build log - - [`bd0264c`](https://github.com/bitwarden/android/commit/bd0264c71a03e4850b0e83eda58c5fb31d22f569) Apply setup-android-build action to remaining workflows - [`3d8c2f2`](https://github.com/bitwarden/android/commit/3d8c2f2fcd25bcd71fbafffe06fd67ded5c41e62) Update test workflow on push branches to include release branches - [`39d4836`](https://github.com/bitwarden/android/commit/39d483674b55618eb49399c25b2e9837106ad904) Remove test code ### 📊 Changes **7 files changed** (+20 additions, -297 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/setup-android-build/action.yml` (+2 -21) 📝 `.github/workflows/build-authenticator.yml` (+5 -76) 📝 `.github/workflows/build-testharness.yml` (+2 -39) 📝 `.github/workflows/build.yml` (+6 -112) 📝 `.github/workflows/test.yml` (+4 -41) 📝 `gradle.properties` (+1 -1) 📝 `settings.gradle.kts` (+0 -7) </details> ### 📄 Description ## 🎟️ Tracking PM-32758 ## 📔 Objective Fix GitHub runners running out of memory by replacing our cache approach with `setup-gradle` action. This action comes with a sensible set of default settings following best practices, worth nothing: * [Cache cleanup](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#configuring-cache-cleanup) * [Restricted write](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#select-which-branches-should-write-to-the-cache) - defaults to `main` branches only, mitigating cache poisoning and useful caches from `main` being replaced by feature branch caches that aren't useful for others, slowing down all runs. While at it: 1. Consolidated everything into our `setup-andoid-build` reusable action 2. Removed local build-cache path override from settings.gradle.kts. Gradle's default cache location is used instead. 3. Increased Gradle heap size from 4g to 6g based on the Post `setup-gradle` action logs, mentioning "cache misses" due to low memory. Test runs - [before](https://github.com/bitwarden/android/actions/runs/22367538659/job/64737475122) | [after](https://github.com/bitwarden/android/actions/runs/22405671990/job/64864713540) 4. Test workflow was updated to run on release branches in addition to main. Test Runs (forced to write cache): * [build-testharness.yml](https://github.com/bitwarden/android/actions/runs/22405671990/job/64864713540) * [build.yml](https://github.com/bitwarden/android/actions/runs/22411262441) * [build-authenticator.yml](https://github.com/bitwarden/android/actions/runs/22411270020) * [test.yml](https://github.com/bitwarden/android/actions/runs/22412907340/job/64890898693) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 15:54:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#48297