Actions: Add caching for PlatformIO in native tests workflow - #11309
Conversation
Also switch to arm64 runners for the tests themelves. In my experience so far, they are faster (and these jobs are heavyy)
📝 WalkthroughWalkthroughThe native test workflow updates runner images, adds conditional PlatformIO cache restore and save steps, and changes report generation to skip only cancelled workflows. ChangesNative CI workflow
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 (1)
.github/workflows/test_native.yml (1)
76-95: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winQualify both PlatformIO cache families by
runner.arch.The workflow now runs native tests on ARM64, but both cache key families remain architecture-neutral. GitHub cache versioning does not isolate CPU architecture, while PlatformIO caches downloaded packages that can be host-specific. Add
${{ runner.arch }}to the exact keys and restore prefixes. GitHub exposesrunner.archfor this purpose. (docs.github.com)
.github/workflows/test_native.yml#L76-L95: qualifypio-simulator-tests-*..github/workflows/test_native.yml#L181-L201: qualifypio-coverage-tests-*.- key: pio-simulator-tests-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }} + key: pio-simulator-tests-${{ runner.arch }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }} ... - pio-simulator-tests- + pio-simulator-tests-${{ runner.arch }}-Apply the same change to the
pio-coverage-tests-*keys.🤖 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/test_native.yml around lines 76 - 95, Qualify both PlatformIO cache key families with runner.arch to prevent cross-architecture cache reuse: update the pio-simulator-tests keys and restore prefix in .github/workflows/test_native.yml lines 76-95, and apply the same change to the pio-coverage-tests keys and restore prefix in lines 181-201.
🤖 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/test_native.yml:
- Around line 76-95: Qualify both PlatformIO cache key families with runner.arch
to prevent cross-architecture cache reuse: update the pio-simulator-tests keys
and restore prefix in .github/workflows/test_native.yml lines 76-95, and apply
the same change to the pio-coverage-tests keys and restore prefix in lines
181-201.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 43572865-ee69-4f4e-9567-7c0e8e27d177
📒 Files selected for processing (1)
.github/workflows/test_native.yml
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
Add caching for PlatformIO in native tests workflow. Also switch to arm64 runners for the tests themelves. In my experience so far, they are faster (and these jobs are heavyy)
Summary by CodeRabbit