-
-
Notifications
You must be signed in to change notification settings - Fork 131
docs: clarify targetPlatform/runs-on OS mapping, Mono vs IL2CPP, unityVersion syntax #584
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,13 +138,47 @@ Platform that the build should target. | |
| Must be one of the [allowed values](https://docs.unity3d.com/ScriptReference/BuildTarget.html) | ||
| listed in the Unity scripting manual. | ||
|
|
||
| _**required:** `true`_ | ||
| _**required:** `true`_ _**example:** `StandaloneWindows64`_ | ||
|
|
||
| **`targetPlatform` determines which `runs-on` OS you need.** The Docker image `unity-builder` | ||
| uses is Linux-only, so any target that isn't natively buildable from Linux runs on that target's | ||
| own OS instead. There's no way to build, say, `StandaloneWindows64` from an `ubuntu-latest` | ||
| runner - use the table below to pick the right `runs-on` for the platform(s) you're building. | ||
|
|
||
| | `runs-on` | `targetPlatform` values it supports | | ||
| | --------------- | --------------------------------------------------------------- | | ||
| | `ubuntu-latest` | `StandaloneLinux64`, `iOS`, `Android`, `WebGL` | | ||
| | `windows-2022` | `StandaloneWindows`, `StandaloneWindows64`, `tvOS`, `WSAPlayer` | | ||
| | `macos-latest` | `StandaloneOSX` | | ||
|
Comment on lines
+148
to
+152
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- target section ---'
sed -n '125,185p' docs/03-github/04-builder.mdx
printf '%s\n' '--- complete example ---'
sed -n '745,790p' docs/03-github/04-builder.mdx
printf '%s\n' '--- relevant references ---'
rg -n -i 'targetPlatform|StandaloneOSX|tvOS|iOS|IL2CPP|Mono|runs-on|macos-latest|ubuntu-latest|windows-2022' docs .github 2>/dev/null | head -250
printf '%s\n' '--- changed-file summary ---'
git diff --stat -- docs/03-github/04-builder.mdxRepository: game-ci/documentation Length of output: 26026 🌐 Web query:
💡 Result: The GameCI unity-builder v4.5.0 release introduced official support for building tvOS projects on macOS runners [1][2]. Key details from the v4.5.0 release regarding these features include: - tvOS Build Support: Prior to this release, tvOS builds were restricted to Windows base environments [2]. Version 4.5.0 added support to enable tvOS builds specifically when using macos-latest runners [1][2]. - Technical Implementation: The update included necessary configuration changes to allow the build process to recognize and utilize macOS base environments for tvOS targets, alongside updates to the module arguments (e.g., using --module appletv) [2]. In addition to these changes, the v4.5.0 release also introduced an option to replace the -nographics argument with install_llvmpipe for Windows builds [1]. Users should refer to the official GameCI documentation for guidance on configuring target platforms in their workflow files [3][4]. Citations:
🌐 Web query:
💡 Result: GameCI provides tools to automate Unity builds in CI/CD pipelines, but the workflow for iOS projects requires a specific multi-stage approach because Apple's build tools (Xcode) must run on macOS [1][2][3]. Key takeaways regarding your query: 1. Ubuntu/Linux Support: GameCI's Unity Builder can run on Ubuntu (via Docker) to generate an Xcode project from your Unity project [1][4]. However, it cannot compile or sign the final iOS application (IPA) directly on Linux [1][2]. 2. macOS Requirement: You must use a macOS environment to compile the generated Xcode project and sign the resulting binary [1][2][3]. This is an Apple requirement. The standard workflow involves a two-stage process: - Stage 1: Use an Ubuntu runner (e.g., GitHub Actions ubuntu-latest) with GameCI's Unity Builder to generate the Xcode project [5][2]. - Stage 2: Pass that generated Xcode project as an artifact to a macOS runner (e.g., GitHub Actions macos-latest or a self-hosted macOS runner) to perform the compilation and code signing [2][3]. 3. Signing and Distribution: Once the project is on a macOS runner, you typically use tools like fastlane to handle the compilation (xcodebuild), code signing, and distribution to App Store Connect or TestFlight [6][7][3]. GameCI documentation recommends being familiar with the manual Xcode distribution process, as automation for signing and deployment can be complex [3]. 4. FAQ Summary: The GameCI FAQ explicitly confirms that while Unity on Linux can generate an Xcode project, a Mac is necessary for the final build and signing steps [1][4]. There are no macOS-based Docker images provided by GameCI [1][4]. Citations:
🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- local FAQ and iOS workflow guidance ---'
sed -n '140,160p' docs/10-faq/index.mdx
sed -n '15,30p' docs/03-github/06-deployment/ios.mdx
sed -n '408,465p' docs/03-github/06-deployment/ios.mdx
printf '%s\n' '--- current builder references ---'
rg -n -C 3 'tvOS|StandaloneOSX|targetPlatform determines|which `runs-on` OS|ubuntu-latest' docs/03-github/04-builder.mdx
printf '%s\n' '--- v4.5 release metadata ---'
curl -L --fail --silent --show-error \
https://api.github.com/repos/game-ci/unity-builder/releases/tags/v4.5.0 |
jq '{tag_name,name,published_at,body}'Repository: game-ci/documentation Length of output: 6502 🌐 Web query:
💡 Result: Unity Builder v4.5.0 added:
The release commit is Clarify the runner matrix scope for Apple targets. This table maps the 🤖 Prompt for AI Agents |
||
|
|
||
| Building for multiple platforms in one workflow means multiple jobs (or a matrix with an | ||
| OS-appropriate `runs-on`) - see the | ||
| [Advanced IL2CPP example](/docs/github/getting-started#advanced-il2cpp-example), which is really a | ||
| multi-platform, multi-OS matrix example (IL2CPP is incidental to it - see the note below). | ||
|
|
||
| **Mono vs IL2CPP** isn't a `unity-builder` input at all - there's no `scriptingBackend` field. | ||
| It's a Unity Player Settings choice (`Project Settings > Player > Other Settings > Scripting | ||
| Backend`), baked into your project before the build ever runs, the same way it would be for a | ||
| local build in the Editor. `unity-builder` just builds whatever your project is already | ||
| configured to build. The one thing that _is_ project-adjacent to this action: IL2CPP builds | ||
| require the base OS to match the build target (same table as above) - there's no cross-compiling | ||
| IL2CPP for Windows from a Linux runner, for example. | ||
|
|
||
| #### unityVersion | ||
|
|
||
| Version of Unity to use for building the project. Use "auto" to get from your | ||
| ProjectSettings/ProjectVersion.txt | ||
|
|
||
| The exact string from Unity Hub/the editor's own version display, including the release tag | ||
| letter and build number - e.g. `2021.3.16f1`, `2022.3.7f1`, `6000.0.23f1`. Not just the numeric | ||
| part (`2021.3.16` alone will not resolve). | ||
|
|
||
| ```yaml | ||
| - uses: game-ci/unity-builder@v4 | ||
| with: | ||
| unityVersion: 2021.3.16f1 | ||
| ``` | ||
|
|
||
| _**required:** `false`_ _**default:** `auto`_ | ||
|
|
||
| #### customImage | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: game-ci/documentation
Length of output: 50380
🌐 Web query:
GameCI unity-builder Docker images Mono IL2CPP supported platforms Linux Windows macOS documentation💡 Result:
GameCI provides specialized Docker images for Unity that support various scripting backends (Mono and IL2CPP) and target platforms. Key points regarding supported platforms and backends: 1. Docker Images and Modules: GameCI offers pre-built editor images (e.g., unityci/editor) categorized by modules [1]. Common modules include base (Linux Mono), linux-il2cpp, windows-mono, mac-mono, ios, android, and webgl [1]. You can also build custom Docker images to combine specific modules as required by your project [1]. 2. IL2CPP Support Constraints: A critical constraint for IL2CPP builds is that they generally require the host environment to match the target platform [2]. For example, building a Windows IL2CPP target typically requires a Windows runner, and building a macOS IL2CPP target requires a macOS runner [2]. Linux IL2CPP builds can be performed using the linux-il2cpp image on any runner that supports Docker [2]. 3. Supported Platforms: GameCI supports building for major platforms, including Windows (64-bit and standard), macOS (StandaloneOSX), Linux (64-bit), Android, iOS, and WebGL [3][4]. 4. Documentation: Official documentation, including setup guides, configuration examples, and troubleshooting, is available at https://game.ci/docs/ [5][6]. Specific usage for the builder action can be found in the GitHub repository and the dedicated documentation site [3][7][6]. In summary, while GameCI provides extensive support for multiple platforms, ensure your CI workflow runner OS is compatible with the requirements of the chosen scripting backend (particularly for IL2CPP) [2].
Citations:
🏁 Script executed:
Repository: game-ci/documentation
Length of output: 49023
🌐 Web query:
site:game.ci/docs/github/builder StandaloneWindows64 ubuntu Mono mac-mono runner💡 Result:
The relevant GameCI GitHub Builder documentation shows:
StandaloneWindows64builds a Windows 64-bit standalone player from an Ubuntu runner. Themac-monorunner/target-platform terminology appears in older CircleCI documentation, not the current GitHub Builder docs. (game.ci)Citations:
Scope the runner matrix to the scripting backend.
The OS-match requirement applies to IL2CPP, not every
targetPlatform.windows-monoandmac-monoimages supportStandaloneWindows64andStandaloneOSXfrom Linux-based workflows. Make the backend assumption explicit in the table and in the complete example. Use OS-matched runners when the example builds IL2CPP.🤖 Prompt for AI Agents