Add build CI for changed apps - #248
Merged
Merged
Conversation
Build every app a PR touches with standalone ufbt against the Unleashed SDK, so a change that does not compile is caught before merge. The pack has 300+ apps, so the workflow walks the PR diff down to pack/appname directories and builds only what changed. Some apps need firmware-internal headers and can only be compiled inside the firmware tree; those go in .github/no-standalone-build.txt and are skipped. The list starts empty on purpose - phase 1 is report-only, so the run summary shows which apps actually fail and the list can be filled in from real data instead of guesswork. Dropping the continue-on-error line then turns this into a real merge gate. Uses pull_request, never pull_request_target: this compiles code straight from the PR and must run with a read-only token and no secrets. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the build check this repo has been missing - right now nothing verifies that an app still compiles before it is merged.
What it does
Walks the PR diff down to
pack/appnamedirectories and builds only the apps that changed. The pack carries 321 apps (75 base / 64 catalog / 182 non-catalog) so building everything per PR is not viable; a typical PR touches one.Each app is built with standalone
ufbtagainst the Unleashed SDK - the same index and channel used locally:Built
.faps are uploaded as artifacts, and the run summary carries a per-app pass/fail table.Phase 1 is deliberately report-only
The build step is
continue-on-error: true, so a failing app shows in the summary but does not block a merge.This is on purpose. Some apps in
non_catalog_apps/need firmware-internal headers -assets_icons.h,lib/subghz/protocol_items.h- that only exist when the app is compiled downstream in the firmware tree, and can never build standalone. Guessing which of the 182 those are up front would silently skip apps that build fine. Instead the summary collects the real list, the failures go into.github/no-standalone-build.txt, and then deleting onecontinue-on-errorline turns this into a genuine merge gate. That is a small follow-up PR once there is data.Safety
pull_request, neverpull_request_target- this compiles code straight from the PR, so it must run with the fork's read-only token and no secrets.contents: readonly,persist-credentials: falseon both checkouts, and every PR-derived value is read throughenv:instead of being interpolated into arun:body.What I verified, and what I did not
Verified: YAML parses; the ufbt flags (
--index-url,--channel,--hw-target) are real, checked against the local CLI; the SDK channel matches a working local install; and the changed-app detection was dry-run against the real tree - it selects apps across all three packs, drops directories with noapplication.fam(deleted apps, files moved out of an app), and honours the skip list including comment and blank lines.Not verified: the actual
ufbtbuild on a GitHub runner. Note this workflow is paths-filtered to the three pack directories, so it will not run on this PR, which only touches.github/. After merge, smoke-test it with the "Run workflow" button - theworkflow_dispatchinput takes an explicit app list, e.g.base_pack/tetris_game apps_source_code/4inrow_game- before relying on it.🤖 Generated with Claude Code