Skip to content

ci: pick the build channel from the source tree, not just the target - #121

Merged
TheAngryRaven merged 1 commit into
BETAfrom
claude/sprint-mode-race-types-wt9s7o
Aug 3, 2026
Merged

ci: pick the build channel from the source tree, not just the target#121
TheAngryRaven merged 1 commit into
BETAfrom
claude/sprint-mode-race-types-wt9s7o

Conversation

@TheAngryRaven

Copy link
Copy Markdown
Owner

Summary

Fixes the two red compile-sketch jobs on #113 (BETAmaster).

compile-sketch.yml resolved LAPTIMER_REF / FEATURE_FLAGS from github.base_ref and github.ref_name only. On the integration PR, base_ref is master and — on a pull_request event — ref_name is the merge ref, never the head branch. So BETA's source tree was compiled with master's channel config: DovesLapTimer pinned to v4.2.0 (which predates CrossingEngine/SprintTimer) and -DBIRDSEYE_ENABLE_SENSOREGG off.

BirdsEye/BirdsEye.ino:45:10: fatal error: SprintTimer.h: No such file or directory
   45 | #include <SprintTimer.h>

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.yml runs 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 — add github.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:

  1. Cut a DovesLapTimer release tag carrying CrossingEngine + SprintTimer (BETA has them; v4.2.0 does not) and bump the 'v4.2.0' fallback here, in sim-build.yml, and in release.yml.
  2. Decide whether BIRDSEYE_ENABLE_SENSOREGG ships on master.
  3. BirdsEye/sim/CMakeLists.txt will conflict — BETA hardcodes GIT_TAG BETA, master (after Release 3.0.2 — FWDFU pre-update (reboot into UF2 mass-storage DFU) #117) uses a DOVESLAPTIMER_REF cache variable. Keep master's version.

Test plan

  • yaml.safe_load parses the workflow; both env expressions render as intended
  • CI on this PR (base_ref == BETA) stays green — proves the feature-PR path is untouched
  • Re-run Beta - autocross and more #113's compile-sketch after merge — both board jobs should go green

Generated by Claude Code

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
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Coverage — host-testable units

📂 Overall coverage

Metric Coverage
Lines 🟢 837/847 (98.8%)
Functions 🟢 89/89 (100.0%)
Branches 🟢 677/743 (91.1%)

📄 File coverage

File Lines Functions Branches
BirdsEye/camera_fsm.cpp 🟢 222/230 (96.5%) 🟢 20/20 (100.0%) 🟡 126/144 (87.5%)
BirdsEye/crc32.cpp 🟢 30/30 (100.0%) 🟢 4/4 (100.0%) 🟢 24/24 (100.0%)
BirdsEye/crossing_pattern.cpp 🟢 15/15 (100.0%) 🟢 1/1 (100.0%) 🟢 12/12 (100.0%)
BirdsEye/dovex_header.cpp 🟢 106/107 (99.1%) 🟢 7/7 (100.0%) 🔴 62/88 (70.5%)
BirdsEye/filename_validator.cpp 🟢 14/14 (100.0%) 🟢 1/1 (100.0%) 🟢 30/30 (100.0%)
BirdsEye/gps_stats.cpp 🟢 25/25 (100.0%) 🟢 3/3 (100.0%) 🟢 8/8 (100.0%)
BirdsEye/gps_status_page.cpp 🟢 25/25 (100.0%) 🟢 3/3 (100.0%) 🟢 24/24 (100.0%)
BirdsEye/gps_time.cpp 🟢 45/45 (100.0%) 🟢 6/6 (100.0%) 🟢 30/32 (93.8%)
BirdsEye/gps_validation.cpp 🟢 24/24 (100.0%) 🟢 2/2 (100.0%) 🟢 66/66 (100.0%)
BirdsEye/haversine.cpp 🟢 8/8 (100.0%) 🟢 1/1 (100.0%) ⚫ 0/0 (0.0%)
BirdsEye/insta360_protocol.cpp 🟢 140/140 (100.0%) 🟢 16/16 (100.0%) 🟡 86/98 (87.8%)
BirdsEye/lap_format.cpp 🟢 18/18 (100.0%) 🟢 1/1 (100.0%) 🟢 9/9 (100.0%)
BirdsEye/sat_bars.cpp 🟢 33/33 (100.0%) 🟢 2/2 (100.0%) 🟢 51/54 (94.4%)
BirdsEye/sd_access_policy.cpp 🟢 9/9 (100.0%) 🟢 3/3 (100.0%) 🟢 18/18 (100.0%)
BirdsEye/sd_format_page.cpp 🟢 25/25 (100.0%) 🟢 3/3 (100.0%) 🟢 25/26 (96.2%)
BirdsEye/sensoregg_protocol.cpp 🟢 44/45 (97.8%) 🟢 7/7 (100.0%) 🟢 33/34 (97.1%)
BirdsEye/sprint_select.cpp 🟢 25/25 (100.0%) 🟢 4/4 (100.0%) 🟢 46/48 (95.8%)
BirdsEye/tach_filter.cpp 🟢 15/15 (100.0%) 🟢 3/3 (100.0%) 🟡 7/8 (87.5%)
BirdsEye/wake_cause.cpp 🟢 14/14 (100.0%) 🟢 2/2 (100.0%) 🟢 20/20 (100.0%)

@TheAngryRaven
TheAngryRaven merged commit 403033a into BETA Aug 3, 2026
8 checks passed
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.

2 participants