Skip to content

Add CI workflows for generating Baseline Profiles#3372

Merged
skydoves merged 6 commits into
mainfrom
ci/baseline-profiles
Apr 23, 2026
Merged

Add CI workflows for generating Baseline Profiles#3372
skydoves merged 6 commits into
mainfrom
ci/baseline-profiles

Conversation

@skydoves

@skydoves skydoves commented Apr 21, 2026

Copy link
Copy Markdown
Member

Add CI workflows for generating Baseline Profiles.

This workflow runs biweekly, every Monday at 9 AM CEST (7 AM UTC).


Note

Medium Risk
Adds a new scheduled CircleCI workflow that runs emulator-based Gradle managed devices and performs automated git commit/force-push + PR creation, which can fail due to env/credentials/emulator flakiness or overwrite the automation branch if misconfigured.

Overview
Adds automated baseline profile regeneration to CI.

CircleCI now includes a generate-baseline-profiles job and a biweekly-baseline-profiles scheduled workflow that runs fastlane android generate_baseline_profiles on an emulator and uploads the resulting baseline-prof.txt artifacts.

Fastlane gains a generate_baseline_profiles lane that checks out origin/main into a fixed automation branch, runs generateBaselineProfile with managed-device flags, and if the profile files changed, commits, force-pushes, and opens/updates a PR against main using GITHUB_TOKEN.

Reviewed by Cursor Bugbot for commit f865e7d. Bugbot is set up for automated code reviews on this repo. Configure here.

@skydoves skydoves requested a review from tonidero April 21, 2026 02:41
@skydoves skydoves self-assigned this Apr 21, 2026
@skydoves skydoves requested a review from a team as a code owner April 21, 2026 02:41
Comment thread .github/workflows/baseline-profile.yml Outdated
@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.20%. Comparing base (caa2126) to head (f865e7d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3372   +/-   ##
=======================================
  Coverage   79.20%   79.20%           
=======================================
  Files         360      360           
  Lines       14437    14437           
  Branches     1982     1982           
=======================================
  Hits        11435    11435           
  Misses       2194     2194           
  Partials      808      808           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a comment. But I think the job itself makes sense. Lmk what you think or if I can help!

Comment thread .github/workflows/baseline-profile.yml Outdated
workflow_dispatch:

jobs:
generate-baseline-profiles:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm to keep everything in the same place, I would suggest writing this as a fastlane command and then add it to CircleCI. I think this allows for easier changing of CI providers, and also keeps everything in the same place 🙏 . Do lmk if I can help with that!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alright, I just moved these GitHub workflows as a fastlance command and added it to the CircleCI, configured the generate-baseline-profiles CircleCI job (machine executor) + biweekly-baseline-profiles scheduled workflow. The schedule is configured via CircleCI Scheduled Pipeline (weekly Monday 7 AM UTC). If profiles haven't changed, the lane skips PR creation automatically.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3edf3a5. Configure here.

Comment thread fastlane/Fastfile
if sh("git", "status", "--porcelain").strip.empty?
UI.message("No baseline profile changes detected. Skipping PR creation.")
else
sh("git", "commit", "-m", "Update baseline profiles")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Porcelain check may trigger commit with nothing staged

Medium Severity

git status --porcelain reports all working-tree changes (staged, unstaged, and untracked), but only the two profile files are staged via git add. If the Gradle build produces any file not covered by .gitignore and the profile files themselves haven't changed, the porcelain check evaluates to non-empty while nothing is actually staged — causing git commit to fail and the CI job to error out. The existing helpers (commit_and_push, commit_push_and_create_pr_if_necessary) avoid this because they pair the same check with git add .. A check like git diff --cached --quiet or git diff --cached --name-only would correctly detect only staged changes.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3edf3a5. Configure here.

@skydoves skydoves requested a review from tonidero April 22, 2026 00:04

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for adding this!

Comment thread fastlane/Fastfile
branch_name = "actions/baseline-profiles"
profile_files = [
"purchases/src/main/baseline-prof.txt",
"ui/revenuecatui/src/main/baseline-prof.txt",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR, I wonder if we should also do this for the galaxy + debugview modules... But that can come separately.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sounds good, let me work on this in a separate PR.

@skydoves skydoves enabled auto-merge April 23, 2026 06:13
@skydoves skydoves added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 638069a Apr 23, 2026
38 checks passed
@skydoves skydoves deleted the ci/baseline-profiles branch April 23, 2026 06:48
matteinn pushed a commit to matteinn/purchases-android that referenced this pull request May 5, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Unified StoreReplacementMode API (RevenueCat#3234) via Will Taylor
(@fire-at-will)
* Add placement and targeting context to paywall events (RevenueCat#3253) via Dan
Pannasch (@dpannasch)
### 🐞 Bugfixes
* Fix null Placements when offering_ids_by_placement is absent (RevenueCat#3254)
via Dan Pannasch (@dpannasch)

## RevenueCatUI SDK
### Paywallv2
#### ✨ New Features
* Wire multipage workflow navigation into PaywallViewModel (RevenueCat#3381) via
Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* Add `triggerType` to `WorkflowTrigger` (RevenueCat#3393) via Cesar de la Vega
(@vegaro)
* Extract private function `NavigateTo.toPaywallAction` (RevenueCat#3392) via
Cesar de la Vega (@vegaro)
* Bump revenucatui-tests gradle cache key (RevenueCat#3391) via Toni Rico
(@tonidero)
* Create `WorkflowTriggerType` and `WorkflowTriggerActionType` (RevenueCat#3386)
via Cesar de la Vega (@vegaro)
* Update baseline profiles (RevenueCat#3390) via RevenueCat Git Bot (@RCGitBot)
* Plumb `componentId` through buttons on workflow interactions (RevenueCat#3380)
via Cesar de la Vega (@vegaro)
* Add `ButtonComponent.Action.Workflow` (RevenueCat#3385) via Cesar de la Vega
(@vegaro)
* Add `componentId` to `ButtonCoomponentStyle` (RevenueCat#3384) via Cesar de la
Vega (@vegaro)
* Migrate all suspendCoroutine usages to suspendCancellableCoroutine
(RevenueCat#3365) via Jaewoong Eum (@skydoves)
* Add `WorkflowNavigator` for multipage workflow step navigation (RevenueCat#3379)
via Cesar de la Vega (@vegaro)
* build(deps): bump fastlane-plugin-revenuecat_internal from `b822f01`
to `d24ab26` (RevenueCat#3383) via dependabot[bot] (@dependabot[bot])
* Add `id` field to `ButtonComponent` (RevenueCat#3377) via Cesar de la Vega
(@vegaro)
* Add CI workflows for generating Baseline Profiles (RevenueCat#3372) via Jaewoong
Eum (@skydoves)
* add min sdk level for paywalls and customer center (RevenueCat#2465) via
Muhammad-Sharif Moustafa (@mshmoustafa)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release bookkeeping: updates version strings, changelogs, and
documentation deployment targets without changing runtime logic beyond
the reported version identifier.
> 
> **Overview**
> Cuts the `10.3.0` release by updating all version references from
`10.3.0-SNAPSHOT` to `10.3.0` across build config (`gradle.properties`,
`.version`, `Config.frameworkVersion`) and sample/test app dependency
pins.
> 
> Updates release documentation publishing to sync Dokka output to the
`10.3.0` S3 path and changes `docs/index.html` to redirect to `10.3.0`.
Also promotes release notes by moving `CHANGELOG.latest.md` entries into
a new `CHANGELOG.md` section for `10.3.0`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
056ce62. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants