Skip to content

ci: treat skipped build or validation as success#1148

Merged
doodlum merged 4 commits into
community-shaders:devfrom
alandtse:shader_validation
Jun 16, 2025
Merged

ci: treat skipped build or validation as success#1148
doodlum merged 4 commits into
community-shaders:devfrom
alandtse:shader_validation

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

@alandtse alandtse commented Jun 15, 2025

Summary by CodeRabbit

  • Chores
    • Enhanced build and shader validation workflows to run more consistently while skipping unnecessary steps when no relevant changes are detected, improving efficiency during pull requests and manual triggers.

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

coderabbitai Bot commented Jun 15, 2025

Error: Could not generate a valid Mermaid diagram after multiple attempts.


📜 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 0114325 and deac55c.

📒 Files selected for processing (1)
  • .github/workflows/build.yaml (7 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 updates the CI workflow to treat skipped HLSL validation as a success by adding a dedicated step that checks for HLSL changes and conditionally skips related validation steps.

  • Added a new "Check if HLSL validation needed" step to set a skip flag based on hlsl-should-build.
  • Removed redundant conditions in the workflow trigger and applied the skip flag to subsequent steps.

@@ -182,21 +180,37 @@ jobs:
file: ".github/configs/shader-validation-vr.yaml"
fail-fast: false # Let both configs run to completion for full output
Copy link

Copilot AI Jun 15, 2025

Choose a reason for hiding this comment

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

Consider consolidating the repeated condition 'if: steps.check-hlsl.outputs.skip != 'true'' into a job-level condition or shared variable to reduce redundancy and enhance maintainability.

Suggested change
fail-fast: false # Let both configs run to completion for full output
fail-fast: false # Let both configs run to completion for full output
env:
SKIP_VALIDATION: ${{ steps.check-hlsl.outputs.skip }}

Copilot uses AI. Check for mistakes.
- name: Check if HLSL validation needed
id: check-hlsl
run: |
if [ "${{ needs.check-changes.outputs.hlsl-should-build }}" != "true" ]; then
Copy link

Copilot AI Jun 15, 2025

Choose a reason for hiding this comment

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

Ensure that using ${{ needs.check-changes.outputs.hlsl-should-build }} in the shell condition consistently provides the expected value at runtime; consider additional logging if the variable might be unset or differ in format.

Copilot uses AI. Check for mistakes.
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: 0

🧹 Nitpick comments (2)
.github/workflows/build.yaml (2)

183-194: Introduce initial HLSL validation gating step
The new check-hlsl step correctly inspects needs.check-changes.outputs.hlsl-should-build and emits a skip flag, ensuring subsequent steps run only when needed. For clarity, consider renaming the output from skip to something like skip_hlsl_validation to avoid ambiguity.


196-197: DRY up repeated skip conditions across validation steps (optional)
Steps after check-hlsl all use the same condition: steps.check-hlsl.outputs.skip != 'true'. You could reduce duplication with a YAML anchor:

+  x-skip-hlsl: &skip_hlsl steps.check-hlsl.outputs.skip != 'true'

    steps:
      - name: Checkout code
-       if: steps.check-hlsl.outputs.skip != 'true'
+       if: *skip_hlsl
        uses: actions/checkout@v4

      - uses: ilammy/msvc-dev-cmd@v1.10.0
-       if: steps.check-hlsl.outputs.skip != 'true'
+       if: *skip_hlsl
        # ...

This makes future updates easier by centralizing the skip logic.

Also applies to: 203-205, 206-209, 212-214, 223-225, 231-233, 237-239, 242-244, 247-249

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e15793 and 0114325.

📒 Files selected for processing (1)
  • .github/workflows/build.yaml (3 hunks)
🔇 Additional comments (1)
.github/workflows/build.yaml (1)

164-170: Decoupled job triggering and execution gating for shader-validation
The job-level if: is now simplified to always run on non-draft PRs (or manual runs with validate-shaders:true), moving HLSL-specific checks into dedicated step logic. This separation enhances readability and maintainability.

@alandtse
Copy link
Copy Markdown
Collaborator Author

Hmm, may need to handle the cpp side better too. If no cpp changes, we also don't post a build.

@alandtse alandtse changed the title ci: treat skipped hlsl validation as success ci: treat skipped build or validation as success Jun 15, 2025
@doodlum doodlum merged commit 7a25f25 into community-shaders:dev Jun 16, 2025
6 checks passed
@alandtse
Copy link
Copy Markdown
Collaborator Author

Actually, we always have to build cpp, otherwise we don't have anything to post.

@coderabbitai coderabbitai Bot mentioned this pull request Jun 17, 2025
alandtse added a commit that referenced this pull request Jun 20, 2025
* ci: treat skipped hlsl validation as success

* chore: trigger cpp validation

* ci: allow cpp success without changes

* revert: "chore: trigger cpp validation"

This reverts commit dafb4b9.
davo0411 pushed a commit to davo0411/skyrim-community-shaders that referenced this pull request Jun 21, 2025
)

* ci: treat skipped hlsl validation as success

* chore: trigger cpp validation

* ci: allow cpp success without changes

* revert: "chore: trigger cpp validation"

This reverts commit dafb4b9.
alandtse added a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
)

* ci: treat skipped hlsl validation as success

* chore: trigger cpp validation

* ci: allow cpp success without changes

* revert: "chore: trigger cpp validation"

This reverts commit dafb4b9.
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