ci: cache with msvc key#1172
Conversation
|
""" WalkthroughThe GitHub Actions workflow was refactored to use YAML anchors for reusable steps and configurations. MSVC compiler version extraction was enhanced with a PowerShell script that applies multiple regex patterns, saving the version as a step output. This version is incorporated into cache keys for both C++ build and shader validation jobs, improving cache accuracy and maintainability. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant PowerShell
participant cl.exe
participant Cache
GitHub Actions->>PowerShell: Run cl.exe /Bv to get MSVC version
PowerShell->>cl.exe: Execute version info command
cl.exe-->>PowerShell: Return version output
PowerShell->>GitHub Actions: Parse output with multiple regexes, set MSVC version output or error
GitHub Actions->>Cache: Use MSVC version output in cache keys for restore and save
GitHub Actions->>Build Steps: Continue build with updated cache keys
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/build.yaml (1)
248-260: Ensure output encoding forGITHUB_OUTPUTin shader-validation
Mirror thecpp-buildfix: switch toAdd-Contentor specify UTF-8 encoding when appending toGITHUB_OUTPUT.- echo "version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + Add-Content -Path $env:GITHUB_OUTPUT -Value "version=$version" -Encoding UTF8
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build.yaml(4 hunks)
🔇 Additional comments (2)
.github/workflows/build.yaml (2)
149-155: Cache key includes MSVC version
Good enhancement: the cache key now factors in the compiler version and suffix, improving cache validity across compiler updates. Fallback keys are well structured and cover suffix/no-suffix scenarios.
273-279: Cache key sensitivity for shader-validation
Including both MSVC version and matrix config ensures separate caches per shader config. The fallback keys mirror thecpp-buildjob correctly.
|
Going to draft so the rabbit can rest. Testing in my branch but it's a long iteration between tests. |
Summary by CodeRabbit