mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Compare commits
3 Commits
08c6652ee7
...
eadf983737
Author | SHA1 | Date | |
---|---|---|---|
![]() |
eadf983737 | ||
![]() |
819c2511e0 | ||
![]() |
c6be560bd9 |
13
.github/workflows/build-tests-windows.yml
vendored
13
.github/workflows/build-tests-windows.yml
vendored
@ -26,6 +26,14 @@ jobs:
|
|||||||
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
||||||
- WSAPlayer # Build a UWP App
|
- WSAPlayer # Build a UWP App
|
||||||
- tvOS # Build an Apple TV XCode project
|
- tvOS # Build an Apple TV XCode project
|
||||||
|
enableGpu:
|
||||||
|
- false
|
||||||
|
include:
|
||||||
|
# Additionally test enableGpu build for a standalone windows target
|
||||||
|
- projectPath: test-project
|
||||||
|
unityVersion: 2023.2.2f1
|
||||||
|
targetPlatform: StandaloneWindows64
|
||||||
|
enableGpu: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
###########################
|
###########################
|
||||||
@ -71,6 +79,7 @@ jobs:
|
|||||||
projectPath: ${{ matrix.projectPath }}
|
projectPath: ${{ matrix.projectPath }}
|
||||||
unityVersion: ${{ matrix.unityVersion }}
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
enableGpu: ${{ matrix.enableGpu }}
|
||||||
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
||||||
allowDirtyBuild: true
|
allowDirtyBuild: true
|
||||||
# We use dirty build because we are replacing the default project settings file above
|
# We use dirty build because we are replacing the default project settings file above
|
||||||
@ -96,6 +105,7 @@ jobs:
|
|||||||
projectPath: ${{ matrix.projectPath }}
|
projectPath: ${{ matrix.projectPath }}
|
||||||
unityVersion: ${{ matrix.unityVersion }}
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
enableGpu: ${{ matrix.enableGpu }}
|
||||||
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
||||||
allowDirtyBuild: true
|
allowDirtyBuild: true
|
||||||
# We use dirty build because we are replacing the default project settings file above
|
# We use dirty build because we are replacing the default project settings file above
|
||||||
@ -120,6 +130,7 @@ jobs:
|
|||||||
projectPath: ${{ matrix.projectPath }}
|
projectPath: ${{ matrix.projectPath }}
|
||||||
unityVersion: ${{ matrix.unityVersion }}
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
enableGpu: ${{ matrix.enableGpu }}
|
||||||
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
||||||
allowDirtyBuild: true
|
allowDirtyBuild: true
|
||||||
# We use dirty build because we are replacing the default project settings file above
|
# We use dirty build because we are replacing the default project settings file above
|
||||||
@ -129,6 +140,6 @@ jobs:
|
|||||||
###########################
|
###########################
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Build ${{ matrix.targetPlatform }} on Windows (${{ matrix.unityVersion }})
|
name: Build ${{ matrix.targetPlatform }} on Windows (${{ matrix.unityVersion }})${{ matrix.enableGpu && ' With GPU' || '' }}
|
||||||
path: build
|
path: build
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
9
dist/platforms/windows/build.ps1
vendored
9
dist/platforms/windows/build.ps1
vendored
@ -148,13 +148,20 @@ Write-Output "# Building project #"
|
|||||||
Write-Output "###########################"
|
Write-Output "###########################"
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
|
$unityGraphics = "-nographics"
|
||||||
|
|
||||||
|
if ($LLVMPIPE_INSTALLED -eq "true")
|
||||||
|
{
|
||||||
|
$unityGraphics = "-force-opengl"
|
||||||
|
}
|
||||||
|
|
||||||
# If $Env:CUSTOM_PARAMETERS contains spaces and is passed directly on the command line to Unity, powershell will wrap it
|
# If $Env:CUSTOM_PARAMETERS contains spaces and is passed directly on the command line to Unity, powershell will wrap it
|
||||||
# in double quotes. To avoid this, parse $Env:CUSTOM_PARAMETERS into an array, while respecting any quotations within the string.
|
# in double quotes. To avoid this, parse $Env:CUSTOM_PARAMETERS into an array, while respecting any quotations within the string.
|
||||||
$_, $customParametersArray = Invoke-Expression('Write-Output -- "" ' + $Env:CUSTOM_PARAMETERS)
|
$_, $customParametersArray = Invoke-Expression('Write-Output -- "" ' + $Env:CUSTOM_PARAMETERS)
|
||||||
$unityArgs = @(
|
$unityArgs = @(
|
||||||
"-quit",
|
"-quit",
|
||||||
"-batchmode",
|
"-batchmode",
|
||||||
"-nographics",
|
$unityGraphics,
|
||||||
"-silent-crashes",
|
"-silent-crashes",
|
||||||
"-customBuildName", "`"$Env:BUILD_NAME`"",
|
"-customBuildName", "`"$Env:BUILD_NAME`"",
|
||||||
"-projectPath", "`"$Env:UNITY_PROJECT_PATH`"",
|
"-projectPath", "`"$Env:UNITY_PROJECT_PATH`"",
|
||||||
|
5
dist/platforms/windows/entrypoint.ps1
vendored
5
dist/platforms/windows/entrypoint.ps1
vendored
@ -13,6 +13,11 @@ Get-Process -Name regsvr32 | ForEach-Object { Stop-Process -Id $_.Id -Force }
|
|||||||
# Setup Git Credentials
|
# Setup Git Credentials
|
||||||
. "c:\steps\set_gitcredential.ps1"
|
. "c:\steps\set_gitcredential.ps1"
|
||||||
|
|
||||||
|
if ($env:ENABLE_GPU -eq "true") {
|
||||||
|
# Install LLVMpipe software graphics driver
|
||||||
|
. "c:\steps\install_llvmpipe.ps1"
|
||||||
|
}
|
||||||
|
|
||||||
# Activate Unity
|
# Activate Unity
|
||||||
if ($env:SKIP_ACTIVATION -ne "true") {
|
if ($env:SKIP_ACTIVATION -ne "true") {
|
||||||
. "c:\steps\activate.ps1"
|
. "c:\steps\activate.ps1"
|
||||||
|
56
dist/platforms/windows/install_llvmpipe.ps1
vendored
Normal file
56
dist/platforms/windows/install_llvmpipe.ps1
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
$Private:repo = "mmozeiko/build-mesa"
|
||||||
|
$Private:downloadPath = "$Env:TEMP\mesa.zip"
|
||||||
|
$Private:extractPath = "$Env:TEMP\mesa"
|
||||||
|
$Private:destinationPath = "$Env:UNITY_PATH\Editor\"
|
||||||
|
$Private:version = "25.1.0"
|
||||||
|
|
||||||
|
$LLVMPIPE_INSTALLED = "false"
|
||||||
|
|
||||||
|
try {
|
||||||
|
# Get the release info from GitHub API (version fixed to decrease probability of breakage)
|
||||||
|
$releaseUrl = "https://api.github.com/repos/$repo/releases/tags/$version"
|
||||||
|
$release = Invoke-RestMethod -Uri $releaseUrl -Headers @{ "User-Agent" = "PowerShell" }
|
||||||
|
|
||||||
|
# Get the download URL for the zip asset
|
||||||
|
$zipUrl = $release.assets | Where-Object { $_.name -like "mesa-llvmpipe-x64*.zip" } | Select-Object -First 1 -ExpandProperty browser_download_url
|
||||||
|
|
||||||
|
if (-not $zipUrl) {
|
||||||
|
throw "No zip file found in the latest release."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download the zip file
|
||||||
|
Write-Host "Downloading $zipUrl..."
|
||||||
|
Invoke-WebRequest -Uri $zipUrl -OutFile $downloadPath
|
||||||
|
|
||||||
|
# Create extraction directory if it doesn't exist
|
||||||
|
if (-not (Test-Path $extractPath)) {
|
||||||
|
New-Item -ItemType Directory -Path $extractPath | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Extract the zip file
|
||||||
|
Write-Host "Extracting $downloadPath to $extractPath..."
|
||||||
|
Expand-Archive -Path $downloadPath -DestinationPath $extractPath -Force
|
||||||
|
|
||||||
|
# Create destination directory if it doesn't exist
|
||||||
|
if (-not (Test-Path $destinationPath)) {
|
||||||
|
New-Item -ItemType Directory -Path $destinationPath | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy extracted files to destination
|
||||||
|
Write-Host "Copying files to $destinationPath..."
|
||||||
|
Copy-Item -Path "$extractPath\*" -Destination $destinationPath -Recurse -Force
|
||||||
|
|
||||||
|
Write-Host "Successfully downloaded, extracted, and copied Mesa files to $destinationPath"
|
||||||
|
|
||||||
|
$LLVMPIPE_INSTALLED = "true"
|
||||||
|
} catch {
|
||||||
|
Write-Error "An error occurred: $_"
|
||||||
|
} finally {
|
||||||
|
# Clean up temporary files
|
||||||
|
if (Test-Path $downloadPath) {
|
||||||
|
Remove-Item $downloadPath -Force
|
||||||
|
}
|
||||||
|
if (Test-Path $extractPath) {
|
||||||
|
Remove-Item $extractPath -Recurse -Force
|
||||||
|
}
|
||||||
|
}
|
16
yarn.lock
16
yarn.lock
@ -2042,11 +2042,11 @@ brace-expansion@^1.1.7:
|
|||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
braces@^3.0.2:
|
braces@^3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
|
||||||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
|
||||||
dependencies:
|
dependencies:
|
||||||
fill-range "^7.0.1"
|
fill-range "^7.1.1"
|
||||||
|
|
||||||
browser-process-hrtime@^1.0.0:
|
browser-process-hrtime@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
@ -3219,10 +3219,10 @@ file-entry-cache@^6.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flat-cache "^3.0.4"
|
flat-cache "^3.0.4"
|
||||||
|
|
||||||
fill-range@^7.0.1:
|
fill-range@^7.1.1:
|
||||||
version "7.0.1"
|
version "7.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
|
||||||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
|
||||||
dependencies:
|
dependencies:
|
||||||
to-regex-range "^5.0.1"
|
to-regex-range "^5.0.1"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user