Actions: Add caching for MacOS and Windows build workflows - #11194
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe macOS and Windows native build workflows now cache dependency artifacts. The macOS workflow skips Homebrew updates and cleanup, adds ChangesNative build workflows
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/build_macos_bin.yml (1)
48-55: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAlign both PlatformIO cache keys with all included configuration files.
Both keys hash only two files even though
platformio.iniimports additional variant and platform configuration files. Hash the completeextra_configsinput set in both workflows so dependency changes create a new cache; existing cache contents cannot be modified in place. (docs.github.com)
.github/workflows/build_macos_bin.yml#L48-L55: include all native dependency configuration files in thepio-macoskey..github/workflows/build_windows_bin.yml#L74-L81: apply the same complete configuration hash to thepio-windowskey.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build_macos_bin.yml around lines 48 - 55, Update the PlatformIO cache key in .github/workflows/build_macos_bin.yml lines 48-55 to hash every native dependency configuration file included by extra_configs, and apply the same complete configuration hash to the pio-windows key in .github/workflows/build_windows_bin.yml lines 74-81. Keep the corresponding restore-key prefixes unchanged so configuration changes produce distinct caches in both workflows.Source: MCP tools
.github/workflows/build_windows_bin.yml (1)
55-55: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winTie pip caching to the PlatformIO dependency declaration.
setup-pythoncreates pip cache keys from discovered dependency files orcache-dependency-path, while this step installs unpinnedplatformioinline. Add a pinnedrequirements.txt/pyproject.tomlforplatformio, setcache-dependency-pathto that file, and install from the same file so the cache key reflects the package being installed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build_windows_bin.yml at line 55, Update the setup-python step using cache: "pip" to declare a pinned PlatformIO dependency in a requirements.txt or pyproject.toml file, set cache-dependency-path to that file, and change the PlatformIO installation to read from the same declaration so cache invalidation tracks the installed version.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/build_macos_bin.yml:
- Around line 48-55: Update the PlatformIO cache key in
.github/workflows/build_macos_bin.yml lines 48-55 to hash every native
dependency configuration file included by extra_configs, and apply the same
complete configuration hash to the pio-windows key in
.github/workflows/build_windows_bin.yml lines 74-81. Keep the corresponding
restore-key prefixes unchanged so configuration changes produce distinct caches
in both workflows.
In @.github/workflows/build_windows_bin.yml:
- Line 55: Update the setup-python step using cache: "pip" to declare a pinned
PlatformIO dependency in a requirements.txt or pyproject.toml file, set
cache-dependency-path to that file, and change the PlatformIO installation to
read from the same declaration so cache invalidation tracks the installed
version.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ae4366c-7e9f-4e64-9f22-47718552576e
📒 Files selected for processing (2)
.github/workflows/build_macos_bin.yml.github/workflows/build_windows_bin.yml
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
This pull request introduces improvements to the CI build workflows for both MacOS and Windows, mainly focused on speeding up builds and reducing redundant downloads by adding caching for Homebrew, PlatformIO, and pip dependencies. These changes help make the builds more reliable and efficient.
Build caching improvements:
MacOS workflow (
.github/workflows/build_macos_bin.yml):Windows workflow (
.github/workflows/build_windows_bin.yml):Summary by CodeRabbit
Performance
Reliability
Maintenance
jsoncpppackage.