Skip to content

Commit 427a85a

Browse files
Eric Migicovskyclaude
andcommitted
ci: auto-run the hardware-lab release-QA on each firmware PR
After build-qa-firmware produces the dual-slot artifact, dispatch coredevices/unicorn's one-off-pebbleos-test against this run's qa-firmware-<board> (erase -> PRF -> pair -> OTA -> functional pass on a real phone + watch), using the most recently tagged coreapp release. The unicorn run posts a unicorn/release-qa commit status back on the PR commit. Internal PRs only (forks have no secrets). Per-PR concurrency so a newer push supersedes the older dispatch. Requires UNICORN_DISPATCH_TOKEN (a PAT with actions:write on coredevices/unicorn) in this repo's secrets; without it the job no-ops with a warning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Eric Migicovsky <eric@repebble.com>
1 parent 2940481 commit 427a85a

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/build-firmware.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,36 @@ jobs:
194194
name: qa-firmware-${{ steps.artifact_board.outputs.NAME }}
195195
path: out/**
196196

197+
# Once the dual-slot QA firmware is built, kick off the hardware-lab release-QA in
198+
# coredevices/unicorn against THIS run's qa-firmware artifact (erase -> PRF -> pair -> OTA ->
199+
# functional pass on a real phone + watch), using the most recently tagged coreapp release. The
200+
# unicorn run posts a `unicorn/release-qa` commit status back on this PR's commit. Internal PRs
201+
# only (forks have no secrets); needs UNICORN_DISPATCH_TOKEN — a PAT with actions:write on unicorn.
202+
dispatch-release-qa:
203+
needs: build-qa-firmware
204+
if: >-
205+
github.event_name == 'pull_request' &&
206+
needs.build-qa-firmware.result == 'success' &&
207+
github.event.pull_request.head.repo.full_name == github.repository
208+
runs-on: ubuntu-24.04
209+
# One in-flight QA per PR: a newer push supersedes the older dispatch instead of queueing extras.
210+
concurrency:
211+
group: release-qa-dispatch-${{ github.event.pull_request.number }}
212+
cancel-in-progress: true
213+
steps:
214+
- name: Dispatch the hardware-lab release-QA (coredevices/unicorn)
215+
env:
216+
GH_TOKEN: ${{ secrets.UNICORN_DISPATCH_TOKEN }}
217+
run: |
218+
if [ -z "${GH_TOKEN:-}" ]; then
219+
echo "::warning::UNICORN_DISPATCH_TOKEN not set — add a PAT with actions:write on coredevices/unicorn to run the hardware release-QA automatically"
220+
exit 0
221+
fi
222+
# to_pbz_run_id = this Build Firmware run (its qa-firmware-<board> artifact is the "to").
223+
# coreapp_run_id omitted -> unicorn uses the most recently tagged coreapp release.
224+
gh workflow run one-off-pebbleos-test.yml -R coredevices/unicorn \
225+
-f to_pbz_run_id=${{ github.run_id }}
226+
197227
build-firmware-status:
198228
needs: [changes-firmware, build-firmware]
199229
if: always()

0 commit comments

Comments
 (0)