9090 with :
9191 name : runelite-jars
9292 path : runelite-jars
93- - name : Restore OpenRS2 cache
94- uses : actions/cache/restore@v4
95- with :
96- path : cache/input/${{ inputs.cache_version }}
97- key : openrs2-cache-${{ inputs.cache_version }}-
98- enableCrossOsArchive : true
99- fail-on-cache-miss : true
100- - name : Copy cache
101- run : Move-Item "cache/input/${{ inputs.cache_version }}/*" $env:USERPROFILE\.runelite\jagexcache\oldschool\LIVE
10293 - name : Copy preferences.dat
10394 run : |
10495 $runeliteCacheDir = "$env:USERPROFILE\.runelite\jagexcache\oldschool\LIVE"
@@ -109,11 +100,20 @@ jobs:
109100 $jar = Get-ChildItem runelite-jars -Filter "*-shaded.jar" | Select-Object -First 1
110101 if (-not $jar) { Write-Error "Shaded jar not found"; exit 1 }
111102 $process = Start-Process -FilePath "java" -ArgumentList "-Dfile.encoding=UTF8 -jar", $jar.FullName -NoNewWindow -PassThru -RedirectStandardOutput "output.log" -RedirectStandardError "error.log"
112- $timeout = 300
113- $elapsed = 0
114- while (-not $process.HasExited -and $elapsed -lt $timeout) {
115- Start-Sleep -Seconds 5
116- $elapsed += 5
103+ while (-not $process.HasExited) {
104+ if (Test-Path "output.log") {
105+ $content = Get-Content "output.log" -Raw
106+ if ($content -match "cache itemModelCache thrashing, enlarging to 512 entries") {
107+ Write-Host "Startup completed, stopping process"
108+ Stop-Process -Id $process.Id -Force
109+ break
110+ }
111+ }
112+ }
113+ Get-Content "output.log" -ErrorAction SilentlyContinue
114+ Get-Content "error.log" -ErrorAction SilentlyContinue
115+ $process = Start-Process -FilePath "java" -ArgumentList "-Dfile.encoding=UTF8 -jar", $jar.FullName -NoNewWindow -PassThru -RedirectStandardOutput "output.log" -RedirectStandardError "error.log"
116+ while (-not $process.HasExited) {
117117 if (Test-Path "output.log") {
118118 $content = Get-Content "output.log" -Raw
119119 if ($content -match "ItemFinder completed") {
@@ -123,10 +123,6 @@ jobs:
123123 }
124124 }
125125 }
126- if ($elapsed -ge $timeout) {
127- Write-Host "Timeout reached, stopping process"
128- Stop-Process -Id $process.Id -Force
129- }
130126 Get-Content "output.log" -ErrorAction SilentlyContinue
131127 Get-Content "error.log" -ErrorAction SilentlyContinue
132128 - name : Upload ItemFinder
0 commit comments