Actions: Surgical CI - Only run PRs upon actual change - #11151
Actions: Surgical CI - Only run PRs upon actual change#11151vidplace7 wants to merge 14 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
|
Really like the surgical-CI direction. I took a pass at making the arch/source mapping lean on PlatformIO instead of the hardcoded tables, since that was the part most likely to rot as boards get added -- companion PR against your branch here: #11161. It derives the |
6ec3b78 to
cf1c6bd
Compare
That's not a thing!
Builds on the surgical-CI change so the change-detection is self-maintaining when a board or arch is added: - Derive platform/<subdir> -> arch top-dirs from each env's build_src_filter (+<platform/X> re-includes). The ESP32 family self-groups, so ESP32_FAMILY and PLATFORM_SRC_TOPDIRS are dropped entirely. Also fixes src/platform/ extra_variants/, which was unmapped and fell back to a full build. - Read [platformio] extra_configs for the env-definition ini globs instead of a hardcoded 2-glob tuple (anti-rot; no behavior change on the current tree). - Make _emittable an allowlist (None/pr/extra) so a retired or typo'd board_level fails closed rather than silently building. - Workflow: the generator now no-ops on an absent/empty --changed-files, so drop the EXTRA / [[ -s ]] bash plumbing and pass it unconditionally. Verified against real PlatformIO: full, PR, and check matrices plus every changed-file scenario produce identical output to the PR head. 28/28 unit tests pass.
Follow-up to the derive-from-PlatformIO change, closing two review findings: - base_ini_platform_incl() now uses the same extra_configs-derived globs as env_definition_dirs (via a shared board_ini_globs() helper) instead of the hardcoded fallback. Previously the two .ini scans could diverge: a new extra_configs glob would be picked up by the env-definition scan but not the arch-base scan, so a family base in a new location could be scoped to a single top-dir -> under-build. No behavior change on the current tree. - base_ini_platform_incl() maps each base .ini to the SET of platform trees it re-includes (was: only bases with exactly one +<platform/X>). A base that re-includes multiple trees now fans out to all of them in Tier 2b, a safe superset, rather than being silently dropped (which scoped it to one top-dir -> under-build). Fails open, not closed. Verified: 31/31 unit tests (3 new: multi-include mapping, Tier 2b superset, board_ini_globs). Real-PlatformIO matrix output identical to the PR-head baseline across full/PR/check sets and every changed-file scenario; the extra_variants scenario is the expected 47-env superset. No under-build.
cf1c6bd to
196db1e
Compare
Release attachment moves to the matrix rework in #11151. The MSI is still built and uploaded as a CI artifact.
Release attachment moves to the matrix rework in #11151. The MSI is still built and uploaded as a CI artifact.
* Package meshtasticd for Windows as an MSI Adds a --service flag connecting meshtasticd to the Service Control Manager, a WiX MSI installing it as an auto-start LocalSystem service with config in %ProgramData%\Meshtastic, and a CI step attaching the MSI to releases. * Address review comments Bind workflow expressions to env vars in run: bodies, and build the service status per call with an atomic checkpoint. * Fix service stop state and CI lint Latch the stop under a mutex so a startup report cannot walk the state back. Ignore the new workflows in semgrep and checkov, as main_matrix already is. * Drop the checkov ignore for the winget workflow Resolve the newest release inside the job instead of taking workflow_dispatch inputs, so CKV_GHA_7 no longer fires and checkov stays active on the file. * Carry the MSI architecture into the winget manifest Parse it from the asset name instead of defaulting to x64, and fail on a multi-arch release rather than validating one at random. * Restore release/.gitignore * Leave the main matrix alone Release attachment moves to the matrix rework in meshtastic#11151. The MSI is still built and uploaded as a CI artifact. --------- Co-authored-by: Austin <vidplace7@gmail.com>
Resolves conflicts from #11305 which made board_level explicit. - Keep PR's sophisticated select_changed logic in generate_ci_matrix.py - Update EMITTABLE_LEVELS to use 'release' instead of None - Add board_level validation in load_all_envs (fail fast on missing/unknown levels) - Update build_outlist to match 'release' explicitly instead of not-set - Update tests to use level='release' for release boards - Accept auto-merged board_level = release additions to ~100 variant files
Resolved in dd071fe. The conflict was in For the Python conflict, the PR's sophisticated
All 32 unit tests pass. |
This pull request introduces several improvements to the CI workflow and makes minor configuration changes to two board variants. The main workflow now dynamically narrows the build and check matrices to only the files affected by a pull request, improving efficiency. It also adds a stable "ci-gate" job for branch protection, ensuring that all relevant builds and checks pass before merging. Additionally, two board variants are reclassified from "community" to "extra".
CI Workflow Improvements:
.github/workflows/main_matrix.ymlnow usestj-actions/changed-filesto detect changed files and narrows the build and static analysis jobs to only the affected variants on pull requests, reducing unnecessary builds.ci-gatejob that aggregates the results of all build and check jobs, providing a single status check for branch protection. This ensures merges only happen when all relevant jobs succeed.gather-artifactsjob is now skipped on pull requests, as narrowed builds may not produce all expected artifacts, and this job is only needed for release and nightly workflows.Board Variant Configuration:
board_levelfromcommunitytoextrainvariants/rp2350/diy/pico2_w5500_e22/platformio.iniandvariants/rp2350/diy/wiznet_5500_evb_pico2_e22p/platformio.ini, reclassifying these variants. [1] [2]