ci: always run cpp-build#1149
Conversation
WalkthroughThe GitHub Actions workflow was modified to remove the conditional check for C++ changes, causing all C++ build steps to run unconditionally. The version extraction step was rewritten from a Bash script to a PowerShell script, simplifying the logic to always extract the version from the CMake cache file. The artifact upload step now runs unconditionally on success. Changes
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.
Pull Request Overview
This PR switches the CI version-extraction step from Bash to PowerShell and rewrites the parsing logic accordingly.
- Changed the shell for the
get_versionstep frombashtopwsh - Replaced
grep/sedcommands withGet-ContentandSelect-Stringlogic - Updated how the version output is written to the GitHub Actions file
Comments suppressed due to low confidence (3)
.github/workflows/build.yaml:168
- Select-String returns MatchInfo objects, not raw lines. You should use
$versionLine.Linewhen applying the regex replace to extract the version.
$versionLine = $content | Select-String -Pattern 'project\(.*VERSION'
.github/workflows/build.yaml:176
- In PowerShell you should use
Add-Content -Path $env:GITHUB_OUTPUT -Value "version=$version"to append to the output file instead of relying onecho >>.
echo "version=$version" >> $env:GITHUB_OUTPUT
.github/workflows/build.yaml:167
- [nitpick] Consider renaming
$contentto something more descriptive (e.g.,$fileLines) to clarify what the variable holds.
$content = Get-Content CMakeLists.txt
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/build.yaml (1)
176-176: Use the recommended GitHub Actions output method
In PowerShell it's clearer and more robust to pipe intoOut-Filerather than rely on>>:- echo "version=$version" >> $env:GITHUB_OUTPUT + "version=$version" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append -Encoding utf8
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build.yaml(1 hunks)
🔇 Additional comments (1)
.github/workflows/build.yaml (1)
163-163: Switch to PowerShell for version extraction
Approved change to use thepwshshell for the CMake version extraction step—this aligns with Windows runners.
|
Don't merge as I reconsider this. CPP skipping may not make sense for building but perhaps I can fine tune it so it only skips if it's done a build already once. |
Summary by CodeRabbit