Skip to content

Added install_llvmpipe script to replace -nographics in Windows builds #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 17, 2025

Conversation

DoctorGester
Copy link
Contributor

@DoctorGester DoctorGester commented May 6, 2025

Changes

Added install_llvmpipe.ps1 script on windows which executes before activation, downloads latest release of https://github.com/mmozeiko/build-mesa and puts resulting opengl32.dll near the Editor.exe. On success, sets LLVMPIPE_INSTALLED variable to true and replaces -nographics with -force-opengl in the build script.

Related Issues

#703

Successful Workflow Run Link

https://github.com/DoctorGester/unity-builder/actions/runs/14870908406

Seems like all main platform builds pass and WSAPlayer is failing in other PRs as well.

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make a PR
    in the documentation repo)
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)

Summary by CodeRabbit

  • Chores
    • Expanded Windows build tests to include a configuration with GPU support enabled for the standalone Windows build using Unity 2023.2.2f1.

Copy link

coderabbitai bot commented May 6, 2025

📝 Walkthrough

"""

Walkthrough

The GitHub Actions workflow for Windows builds was updated to add a new matrix entry that tests the test-project with GPU support enabled (enableGpu: true) using Unity version 2023.2.2f1 and the StandaloneWindows64 platform. No code or exported entities were changed.

Changes

File(s) Change Summary
.github/workflows/build-tests-windows.yml Added an enableGpu dimension to the build matrix; included a GPU-enabled test entry for test-project on Unity 2023.2.2f1 targeting StandaloneWindows64; propagated enableGpu to build steps and artifact naming.

Poem

A new build hops into the queue,
With GPU dreams and shaders new!
Windows stands tall, Unity shines bright,
Testing the project through day and night.
With every matrix row we add,
The CI garden grows—how rad!
🐇✨
"""

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between f63df5a and cf13c59.

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

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

github-actions bot commented May 6, 2025

Cat Gif

@webbertakken
Copy link
Member

webbertakken commented May 7, 2025

Looks good to me, but lets make this based on the enableGPU flag as you suggested.

That way we're also sure we don't inadvertently ship different behaviour and potentially break other implementers' workflow.

@DoctorGester
Copy link
Contributor Author

@webbertakken I'm open to that but it seems like we'll need a whole another test matrix row to actually test that, is that ok? Or do we want to add just a single additional windows build target test?

@webbertakken
Copy link
Member

Hmm that seems a bit overkill. Perhaps we can expand the matrix to have a single test for this feature specifically?

Copy link

@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-tests-windows.yml (1)

30-30: Align inline comment casing and clarity
For consistency, update the comment to match the property name and clarify the target platform.

-          # Additionally test enableGPU build for a standalone windows target
+          # Additionally test enableGpu build for StandaloneWindows64 with GPU support
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 81ed299 and 7b5eadc.

⛔ Files ignored due to path filters (5)
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • dist/platforms/windows/build.ps1 is excluded by !**/dist/**
  • dist/platforms/windows/entrypoint.ps1 is excluded by !**/dist/**
  • dist/platforms/windows/install_llvmpipe.ps1 is excluded by !**/dist/**
📒 Files selected for processing (1)
  • .github/workflows/build-tests-windows.yml (1 hunks)
🔇 Additional comments (1)
.github/workflows/build-tests-windows.yml (1)

29-34: Add GPU-enabled Windows build matrix entry
This include block cleanly adds a single test variation for StandaloneWindows64 with enableGpu: true, which aligns with the PR goal of verifying the new graphics flag without expanding the full matrix.

Comment on lines 29 to 34
include:
# Additionally test enableGPU build for a standalone windows target
- projectPath: test-project
unityVersion: 2023.2.2f1
targetPlatform: StandaloneWindows64
enableGpu: true
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify custom action supports enableGpu input and applies -force-opengl
Ensure that the local Unity build action (referenced via uses: ./) defines an enableGpu input and, when true, replaces -nographics with -force-opengl in its invocation.


🏁 Script executed:

#!/bin/bash
# Description: Confirm that the custom GameCI action recognizes `enableGpu` and uses it to set `-force-opengl`.
# 1. Search action metadata & implementation for enableGpu
rg 'enableGpu' -n .
# 2. Search for force-opengl flag usage
rg 'force-opengl' -n .

Length of output: 66784


enableGpu flag not applied in Unity CLI invocation
The custom action defines the enableGpu input (see action.yml:42), but there’s no code handling it to swap out the default -nographics flag for -force-opengl. You’ll need to update the Unity command builder so that when buildParameters.enableGpu is true it:

  • removes or omits the -nographics argument
  • adds the -force-opengl argument

And add or extend tests (e.g. in src/model/input.test.ts) to verify that the CLI args include -force-opengl only when enableGpu is true.

🤖 Prompt for AI Agents
In .github/workflows/build-tests-windows.yml around lines 29 to 34, the
enableGpu flag is set but the Unity CLI invocation does not handle it to replace
the default -nographics flag with -force-opengl. To fix this, update the Unity
command builder code to check if buildParameters.enableGpu is true; if so,
remove or omit the -nographics argument and add the -force-opengl argument
instead. Additionally, extend or add tests, such as in src/model/input.test.ts,
to verify that the CLI arguments include -force-opengl only when enableGpu is
true.

@DoctorGester
Copy link
Contributor Author

@webbertakken ok sorry for the long wait. I added enableGpu parameter support and expanded test matrix to include a single windows standalone build with enableGpu. I also pinned the build-mesa version to whatever is latest today, because I talked with the repository maintainer and he suggested doing that.

@webbertakken webbertakken merged commit 819c251 into game-ci:main May 17, 2025
5 checks passed
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.

2 participants