fix(ci): build the intended targets in the firmware build matrix - #504
Merged
Conversation
The m5stack / m5stack_cores3 legs used `npm run build --target=...`, but npm turns `--target` into the npm_config_target env var, which scripts/firmware.mjs never reads. Both legs silently fell back to the default m5stackchan_cores3 device, so the plain m5stack targets were never actually built in CI. - Add build:m5stack / build:m5stack_cores3 scripts that call mcconfig directly, matching the pre-rearchitecture build behavior - Point the CI matrix at the named scripts and add the missing takao_core2_sg90 leg - Make firmware.mjs fail loudly when npm_config_target is set instead of silently building the default device Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds two new npm build scripts for m5stack platforms in firmware/package.json, updates the CI build matrix to use the dedicated m5stack script and adds a takao_core2_sg90 target, and adds an environment-variable guard in firmware.mjs that rejects the unsupported --target flag. ChangesBuild script and CI wiring
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
17 tasks
15 tasks
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
CIのbuildマトリクスのうち m5stack / m5stack_cores3 レグが
npm run build --target=esp32/...を使っていましたが、npm は--targetを argv ではなくnpm_config_target環境変数に変換し、scripts/firmware.mjsはこれを参照しないため、両レグともデフォルトの m5stackchan_cores3 に沈黙フォールバックしていました(素のm5stack系はCIで一度もビルドされておらず、m5stackchan_cores3 が3回ビルドされていた)。build:m5stack/build:m5stack_cores3スクリプトを追加(リアーキ前のbuildと同じくmanifest_local.jsonを mcconfig 直接呼び出しでビルド)takao_core2_sg90レグを追加firmware.mjsにnpm_config_target検知ガードを追加し、--target=形式を沈黙フォールバックではなくエラーにするRelease impact
none
CI設定と開発用ビルドラッパのみの変更で、出荷ファームウェアのコードには影響しません。リリースノート・changesetは不要です。
Validation
source ~/.local/share/xs-dev-export.sh && npm run build:m5stack→ OKsource ~/.local/share/xs-dev-export.sh && npm run build:m5stack_cores3→ OKnpm run build --target=esp32/m5stack→ 新ガードによりエラーメッセージを出して失敗することを確認STACKCHAN_DRY_RUN=1 npm run build→ 既存のデフォルトビルド(m5stackchan_cores3)が従来どおり動作npx biome check scripts/firmware.mjs package.json→ OKtakao_core2_sg90 レグは本PRのCI実行で初回検証されます。
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes