Skip to content

DEV-1359: a Java API release opens a driver-bump PR in ShimmerAndroidAPI - #341

Merged
JongChern merged 1 commit into
masterfrom
DEV-1359_android_driver_bump_pr
Oct 29, 2026
Merged

JongChern merged 1 commit into
masterfrom
DEV-1359_android_driver_bump_pr

Conversation

@JongChern

@JongChern JongChern commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

After a Java API release, MATLAB is already automated: update-matlab opens the jar PR, and merging it publishes a MATLAB release. Android was not. Nothing happened in ShimmerAndroidAPI until someone ran its HIL and then Release Android API, and its default driver pin was bumped by hand.

The Android release stays manual, because its gate needs a passing bench HIL on the exact commit and driver. This PR adds the step that can be automated, so Android shows up in the Java release run.

  • New job update-android, modelled on update-matlab. It runs on real releases only, after release, and is skipped on dry runs and PRs. It:
    • checks out ShimmerResearch/ShimmerAndroidAPI with ANDROID_REPO_TOKEN. If that secret is missing, it stops with an ::error:: naming it.
    • changes findProperty('driverVersion') ?: '<old>' in ShimmerAndroidInstrumentDriver/build.gradle to the new version, on branch driver_<version>.
    • opens a PR with the manual steps as a checklist. Before merging: CI is green, and the driver changes since the old pin (a link to compare API_v<old>...API_v<new>) contain no parser, CRC or ACK fixes that need porting to Shimmer.java. After merging: tools/hil/run-android-hil.ps1 -Report -DriverVersion <version> at master's new commit, then Release Android API.
    • puts the PR link in the step summary.
    • skips if master is already on that version, or the PR is open (it reports the link). If the branch exists without a PR, it also skips, with a warning. It fails if the pin line is missing or appears twice.
  • "How to release" step 3, the job list in the header, the run summary's Next: line, and AGENTS.md now describe the Android steps.

What you need to add

  • Secret ANDROID_REPO_TOKEN in this repo: a fine-grained token with resource owner ShimmerResearch, repository ShimmerAndroidAPI only, and Contents and Pull requests set to read/write. Without it, update-android fails once the release is already out: add the secret, then "Re-run failed jobs".
  • The bump PRs will be authored by the token's owner. ShimmerAndroidAPI's master currently needs no approving review, so that owner can still merge them.

Tested

  • The step's script, extracted from this YAML and run with bash -eo pipefail as Actions runs it. It ran against a scratch repo holding ShimmerAndroidAPI master's build.gradle, with a local bare repo as origin and a stub gh. Six cases:
    1. A new version (0.11.12_beta) changes only the pin line, pushes driver_0.11.12_beta, opens the PR (body checked as rendered) and writes the summary line.
    2. If the branch exists with no open PR, it skips with a warning.
    3. If the PR is already open, it reports that link.
    4. If master is already on the version, it opens no PR.
    5. If the pin line is missing, it fails.
    6. If the pin line appears twice, it fails.
  • The YAML parses, and the job graph is unchanged apart from the new job.
  • This PR's dry run covers build and matlab-jar. update-android is skipped there, as update-matlab is.

Only testable at the next real release

The job runs only on a real release. So the real token, the cross-repo checkout and push, gh pr create against GitHub, and the ShimmerAndroidAPI CI run the PR starts are all first exercised then. A PR opened with a PAT starts workflows; GitHub suppresses that only for GITHUB_TOKEN.

Known consequence

The next Java release will include DEV-1337 (#339). On its bump PR, AAPI_00002, AAPI_00003 and AAPI_00005 will fail until they are adapted, because they expect startSDLogging() on a streaming Shimmer3R to queue SET_RWC. That is the same change #339 made to API_00027, API_00030 and API_00032. Neither PR changes those tests.

Companion

ShimmerResearch/ShimmerAndroidAPI#141 adds the library's unit tests to that repo's CI. Without it, a bump PR would only build.

Sibling APIs: this is release tooling, not wire format, so no other host API needs it.

🤖 Generated with Claude Code

New job update-android, modelled on update-matlab: on a real release, after
the release job, it moves the default driver version in ShimmerAndroidAPI's
ShimmerAndroidInstrumentDriver/build.gradle to the new one on a
driver_<version> branch and opens a PR. The PR lists the steps that stay
manual: check the driver changes since the last pin for parser, CRC or ACK
fixes to port to Shimmer.java, run the Android HIL at master's new commit
after merging, then run Release Android API. It skips if master is already
on that version or the branch or PR exists, and links the PR in the step
summary.

Needs a new secret, ANDROID_REPO_TOKEN: a fine-grained token for
ShimmerResearch/ShimmerAndroidAPI with Contents and Pull requests
read/write. Without it the job stops with an error, as update-matlab does.

How to release step 3, the run summary's Next line and AGENTS.md now
describe the Android steps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JongChern
JongChern merged commit 26ae4e7 into master Oct 29, 2026
8 checks passed
@JongChern
JongChern deleted the DEV-1359_android_driver_bump_pr branch October 29, 2026 03:41
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.

1 participant