Skip to content

ci: always run cpp-build#1149

Merged
alandtse merged 6 commits into
community-shaders:devfrom
alandtse:shader_validation
Jun 17, 2025
Merged

ci: always run cpp-build#1149
alandtse merged 6 commits into
community-shaders:devfrom
alandtse:shader_validation

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

@alandtse alandtse commented Jun 16, 2025

Summary by CodeRabbit

  • Chores
    • Updated the version extraction step in the build workflow to use PowerShell instead of Bash for improved compatibility and consistency on Windows runners.
    • Modified build workflow steps to run unconditionally, streamlining the build process.

Copilot AI review requested due to automatic review settings June 16, 2025 00:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 16, 2025

Walkthrough

The 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

File(s) Change Summary
.github/workflows/build.yaml Removed conditional skip for C++ build steps; changed version extraction from Bash to PowerShell with simplified logic; upload artifacts step runs unconditionally

Possibly related PRs

Suggested reviewers

  • doodlum

Poem

A bunny hopped from Bash to pwsh,
With scripts rewritten in a flash.
Extracting versions, swift and neat,
In PowerShell, it can't be beat.
The workflow's flow is now brand new,
With carrots, code, and output too! 🥕


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c12b65a and d4e3837.

📒 Files selected for processing (1)
  • .github/workflows/build.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build.yaml

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_version step from bash to pwsh
  • Replaced grep/sed commands with Get-Content and Select-String logic
  • 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.Line when 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 on echo >>.
echo "version=$version" >> $env:GITHUB_OUTPUT

.github/workflows/build.yaml:167

  • [nitpick] Consider renaming $content to something more descriptive (e.g., $fileLines) to clarify what the variable holds.
$content = Get-Content CMakeLists.txt

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 into Out-File rather 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7a25f25 and 2210ac7.

📒 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 the pwsh shell for the CMake version extraction step—this aligns with Windows runners.

Comment thread .github/workflows/build.yaml Outdated
@alandtse
Copy link
Copy Markdown
Collaborator Author

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.

@alandtse alandtse changed the title ci: switch to powershell commands ci: always run cpp-build Jun 17, 2025
@alandtse alandtse merged commit b8b7e7d into community-shaders:dev Jun 17, 2025
8 checks passed
alandtse added a commit that referenced this pull request Jun 20, 2025
davo0411 pushed a commit to davo0411/skyrim-community-shaders that referenced this pull request Jun 21, 2025
alandtse added a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants