|
39 | 39 | - unityVersion: 6000.0.36f1 |
40 | 40 | targetPlatform: StandaloneWindows64 |
41 | 41 | buildProfile: 'Assets/Settings/Build Profiles/Sample Windows Build Profile.asset' |
42 | | - |
| 42 | + |
43 | 43 | steps: |
44 | 44 | ########################### |
45 | 45 | # Checkout # |
|
66 | 66 | run: | |
67 | 67 | Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force |
68 | 68 |
|
| 69 | + ########################### |
| 70 | + # Docker Readiness # |
| 71 | + ########################### |
| 72 | + - name: Ensure Docker daemon is ready |
| 73 | + timeout-minutes: 2 |
| 74 | + shell: powershell |
| 75 | + run: | |
| 76 | + $maxRetries = 10 |
| 77 | + $retryDelay = 6 |
| 78 | + for ($i = 0; $i -lt $maxRetries; $i++) { |
| 79 | + $svc = Get-Service docker -ErrorAction SilentlyContinue |
| 80 | + if ($svc -and $svc.Status -eq 'Running') { |
| 81 | + docker version 2>$null |
| 82 | + if ($LASTEXITCODE -eq 0) { |
| 83 | + Write-Host "Docker is ready." |
| 84 | + exit 0 |
| 85 | + } |
| 86 | + } |
| 87 | + if ($svc -and $svc.Status -eq 'Stopped') { |
| 88 | + Write-Host "Docker service stopped, attempting to start..." |
| 89 | + Start-Service docker -ErrorAction SilentlyContinue |
| 90 | + } |
| 91 | + Write-Host "Waiting for Docker daemon (attempt $($i+1)/$maxRetries)..." |
| 92 | + Start-Sleep -Seconds $retryDelay |
| 93 | + } |
| 94 | + Write-Error "Docker daemon did not start within $($maxRetries * $retryDelay) seconds" |
| 95 | + exit 1 |
| 96 | +
|
69 | 97 | ########################### |
70 | 98 | # Build # |
71 | 99 | ########################### |
@@ -146,6 +174,8 @@ jobs: |
146 | 174 | ########################### |
147 | 175 | - uses: actions/upload-artifact@v4 |
148 | 176 | with: |
149 | | - name: Build ${{ matrix.targetPlatform }} on Windows (${{ matrix.unityVersion }})${{ matrix.enableGpu && ' With GPU' || '' }}${{ matrix.buildProfile && ' With Build Profile' || '' }} |
| 177 | + name: |
| 178 | + Build ${{ matrix.targetPlatform }} on Windows (${{ matrix.unityVersion }})${{ matrix.enableGpu && ' With |
| 179 | + GPU' || '' }}${{ matrix.buildProfile && ' With Build Profile' || '' }} |
150 | 180 | path: build |
151 | 181 | retention-days: 14 |
0 commit comments