ci: pick the build channel from the source tree, not just the target - #121
Merged
Merged
Conversation
compile-sketch resolved LAPTIMER_REF / FEATURE_FLAGS from base_ref and ref_name only. On the long-lived BETA -> master integration PR (#113) base_ref is master and, on a pull_request event, ref_name is the merge ref -- so BETA's source was compiled against master's channel config: DovesLapTimer pinned to v4.2.0 (no CrossingEngine/SprintTimer) and the SensorEgg flag off. Both board jobs failed on BirdsEye.ino:45:10: fatal error: SprintTimer.h: No such file and would have kept failing for as long as that PR stays open. Add head_ref == 'BETA' so a PR whose *source* is BETA builds with BETA's library ref and flags. Feature PRs into BETA (base_ref) and pushes to BETA (ref_name) are unchanged, as is every master/release build. The fallbacks stay pinned: promoting BETA to master still requires bumping them deliberately, which is now called out in the comment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnTP6BdA9xjLR5hSWE9frb
Coverage — host-testable units📂 Overall coverage
📄 File coverage
|
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.
Summary
Fixes the two red
compile-sketchjobs on #113 (BETA→master).compile-sketch.ymlresolvedLAPTIMER_REF/FEATURE_FLAGSfromgithub.base_refandgithub.ref_nameonly. On the integration PR,base_refismasterand — on apull_requestevent —ref_nameis the merge ref, never the head branch. So BETA's source tree was compiled with master's channel config: DovesLapTimer pinned tov4.2.0(which predatesCrossingEngine/SprintTimer) and-DBIRDSEYE_ENABLE_SENSOREGGoff.Adding
github.head_ref == 'BETA'makes a PR whose source is BETA build with BETA's library ref and flags — the channel now follows the code being compiled, not only where it is headed.The beta publish channel was never affected:
beta.ymlruns on push to BETA and has been green throughout (its jobs just show up on #113 because they share the head SHA).Changes
.github/workflows/compile-sketch.yml— addgithub.head_ref == 'BETA'to both channel expressions; expand the comment to spell out which of the three refs covers which event.Unchanged: feature PRs into BETA (
base_ref), pushes/dispatches on BETA (ref_name), and every master/release build.Note for whoever merges BETA → master
The fallbacks stay pinned on purpose, so promoting the channel is still a deliberate act. At that point:
CrossingEngine+SprintTimer(BETA has them;v4.2.0does not) and bump the'v4.2.0'fallback here, insim-build.yml, and inrelease.yml.BIRDSEYE_ENABLE_SENSOREGGships on master.BirdsEye/sim/CMakeLists.txtwill conflict — BETA hardcodesGIT_TAG BETA, master (after Release 3.0.2 — FWDFU pre-update (reboot into UF2 mass-storage DFU) #117) uses aDOVESLAPTIMER_REFcache variable. Keep master's version.Test plan
yaml.safe_loadparses the workflow; both env expressions render as intendedbase_ref == BETA) stays green — proves the feature-PR path is untouchedcompile-sketchafter merge — both board jobs should go greenGenerated by Claude Code