Assign correct board per sketch via sketch.yaml; gate in CI (#11)#15
Open
jonfroehlich wants to merge 3 commits into
Open
Assign correct board per sketch via sketch.yaml; gate in CI (#11)#15jonfroehlich wants to merge 3 commits into
jonfroehlich wants to merge 3 commits into
Conversation
The folder→FQBN heuristic mis-targeted 14 sketches, so the compile sweep
flagged them as failures when the code was fine — just compiled for the
wrong board. Add a per-sketch sketch.yaml with default_fqbn so arduino-cli
(and a reader) knows each sketch's real target board:
- Sensors/i2s-Microphone/* (8) -> Adafruit Feather M0 Express (SAMD);
hardware I2S peripheral, I2S.h ships with the Adafruit SAMD core
- BlinkOnboardNeoPixel, SoundLevelOnboardNeopixel (2) -> nRF52840 Feather
(onboard NeoPixel via PIN_NEOPIXEL)
- Serial/SimpleSerial1* (3) -> Leonardo (needs a second hardware UART)
All 13 verified compiling on their assigned boards via arduino-cli.
The 14th, PlayingMusic/SimpleMp3PlayerWithi2sMic, #includes the SAMD-only
I2S.h on an nRF52 board and (per its own header) never worked due to
i2s-mic/VS1053 library incompatibility. Marked LEGACY and listed in
docs/legacy-sketches.md instead of given a board.
CI: arduino/compile-sketches compiles every sketch in a job with that job's
single fqbn (it does not read sketch.yaml), so add SAMD and nRF52 matrix
jobs for the board-specific sketches and gate the 3 Serial1 sketches under
the existing Leonardo job. The remaining plain-Uno sketches in these folders
also compile green and are noted as a follow-up.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Adafruit nRF52 core's build recipe shells out to adafruit-nrfutil even for a plain compile (to package the firmware), so it must be on PATH. It's bundled with a normal IDE install but absent on the CI runner, which broke the nRF52 matrix job. Add a pip-install step gated to that job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an explanatory comment to each per-sketch sketch.yaml so the file isn't a mystery to students browsing the repo: it says what the file does, why it exists, and that in the IDE they still pick the board via Tools -> Board (the target board is named in plain English per file). The textbook teaches manual board selection and never mentions sketch.yaml, and the IDE 2 surfaces it as a tab, so an uncommented file reads as "did I do something wrong?" Also document the convention in CLAUDE.md, including the gotcha that the arduino/compile-sketches CI action does not read sketch.yaml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
|
Status (2026-06-26): ready to merge. All 4 board jobs green ( The latest commit ( One open decision before merging: merge as-is, or first fold in #16 (grow CI coverage). Recommendation: merge now, do #16 separately. Tracked in the roadmap, #17. |
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.
Closes #11.
The folder→FQBN heuristic mis-guessed the board for 14 sketches, so the compile sweep flagged them as failures when the code was actually fine — it was just being compiled for the wrong board. This adds a per-sketch
sketch.yaml(default_fqbn) so botharduino-cliand a human reader know each sketch's real target, then gates the board-specific ones in CI on their real boards.Board assignments (all verified compiling via
arduino-cli)Sensors/i2s-Microphone/*(8)adafruit:samd:adafruit_feather_m0_expressI2S.hships with the Adafruit SAMD coreAddressableLEDs/NeoPixel/BlinkOnboardNeoPixel,Sensors/Microphone/SoundLevelOnboardNeopixel(2)adafruit:nrf52:feather52840PIN_NEOPIXELSerial/SimpleSerial1*(3)arduino:avr:leonardoSerial1)Legacy (the 14th)
PlayingMusic/SimpleMp3PlayerWithi2sMic#includes the SAMD-onlyI2S.hon an nRF52 board and — per its own header — never worked due to i2s-mic/VS1053 library incompatibility. MarkedLEGACY EXAMPLEand listed indocs/legacy-sketches.mdinstead of being given a board.CI
arduino/compile-sketchescompiles every sketch in a job with that job's singlefqbn(it does not readsketch.yaml), so mixed-board folders can't be gated wholesale. This PR:source-url+Adafruit NeoPixel/Adafruit Zero I2Slibs),Serial1sketches under the existing Leonardo job.Verified-green follow-up
While sweeping, I confirmed all 57 remaining plain-Uno sketches in
Sensors/,AddressableLEDs/,Serial/, andPlayingMusic/compile clean onarduino:avr:uno. They were never wrong-board, so gating them is a separable change (a ~57-line allowlist, since the action has no exclude) — left as a fast follow to keep this diff focused.🤖 Generated with Claude Code