Skip to content

Commit 7afd610

Browse files
committed
Update ext.yml
1 parent 476bf01 commit 7afd610

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

.github/workflows/ext.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ jobs:
247247
run: |
248248
$ErrorActionPreference = 'Continue'
249249
$target = "${{ steps.toolset.outputs.target }}"
250+
$phpVersion = "${{ matrix.php }}"
251+
$tsMode = "${{ matrix.ts }}".ToUpper()
250252
251253
Write-Host "📥 Starting download process..." -ForegroundColor Cyan
252254
Write-Host "📁 Target directory: $target" -ForegroundColor Gray
255+
Write-Host "🔧 Configuration: PHP $phpVersion ($tsMode)" -ForegroundColor Gray
253256
254257
$planJson = '${{ steps.plan.outputs.plan }}'
255258
$plan = $planJson | ConvertFrom-Json
@@ -263,7 +266,7 @@ jobs:
263266
$failedCount = 0
264267
$failedExtensions = @()
265268
266-
Write-Host "🎯 Found $totalExtensions extensions to download" -ForegroundColor Cyan
269+
Write-Host "🎯 Found $totalExtensions extensions to download for PHP $phpVersion ($tsMode)" -ForegroundColor Cyan
267270
Write-Host ""
268271
269272
$counter = 0
@@ -273,67 +276,73 @@ jobs:
273276
$file = Join-Path $target $item.file
274277
$extName = $item.display_name
275278
276-
Write-Host "📦 [$counter/$totalExtensions] Downloading: $extName" -ForegroundColor Yellow
279+
Write-Host "📦 [$counter/$totalExtensions] Downloading: $extName (PHP $phpVersion $tsMode)" -ForegroundColor Yellow
277280
278281
try {
279282
# Check URL availability first
280283
$response = Invoke-WebRequest -Uri $url -Method Head -UseBasicParsing -ErrorAction Stop
281284
if ($response.StatusCode -eq 200) {
282285
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing -ErrorAction Stop
283-
Write-Host "✅ Success: $extName downloaded" -ForegroundColor Green
286+
Write-Host "✅ Success: $extName downloaded successfully" -ForegroundColor Green
284287
$downloadedCount++
285288
}
286289
} catch {
287290
$statusCode = ""
288291
if ($_.Exception.Response) {
289292
$statusCode = " (Status: $($_.Exception.Response.StatusCode.value__))"
290293
}
291-
Write-Host "❌ Failed: $extName$statusCode" -ForegroundColor Red
294+
Write-Host "❌ Failed: $extName (PHP $phpVersion $tsMode)$statusCode" -ForegroundColor Red
292295
Write-Host "🔗 URL: $url" -ForegroundColor DarkGray
293-
$failedExtensions += "$extName$statusCode"
296+
$failedExtensions += "$extName (PHP $phpVersion $tsMode)$statusCode"
294297
$failedCount++
298+
299+
# Continue processing other extensions - don't break the loop
300+
continue
295301
}
296302
}
297303
298304
Write-Host ""
299-
Write-Host "📊 Download Summary" -ForegroundColor Cyan
300-
Write-Host "==================" -ForegroundColor Cyan
305+
Write-Host "📊 Download Summary for PHP $phpVersion ($tsMode)" -ForegroundColor Cyan
306+
Write-Host "===========================================" -ForegroundColor Cyan
301307
Write-Host "✅ Successful: $downloadedCount extensions" -ForegroundColor Green
302308
Write-Host "❌ Failed: $failedCount extensions" -ForegroundColor $(if ($failedCount -gt 0) { 'Red' } else { 'Green' })
303309
304310
if ($failedExtensions.Count -gt 0) {
305-
Write-Host "💥 Failed extensions:" -ForegroundColor Red
311+
Write-Host "💥 Failed extensions for PHP $phpVersion ($tsMode):" -ForegroundColor Red
306312
foreach ($failed in $failedExtensions) {
307313
Write-Host " - $failed" -ForegroundColor Red
308314
}
309315
}
310316
311-
# Ensure at least some extensions were downloaded
317+
# Only fail if NO extensions were downloaded at all
312318
if ($downloadedCount -eq 0) {
313-
Write-Host "💥 Critical: No extensions downloaded successfully!" -ForegroundColor Red
314-
throw "Download process failed completely"
319+
Write-Host "💥 Critical: No extensions downloaded successfully for PHP $phpVersion ($tsMode)!" -ForegroundColor Red
320+
Write-Host "🔄 Note: Other PHP/TS combinations will still be processed" -ForegroundColor Yellow
321+
throw "Download process failed completely for this configuration"
315322
}
316323
317324
Write-Host ""
318-
Write-Host "🚀 Proceeding with $downloadedCount available extensions..." -ForegroundColor Green
325+
Write-Host "🚀 Proceeding with $downloadedCount available extensions for PHP $phpVersion ($tsMode)..." -ForegroundColor Green
319326
320327
- name: 📂 Extract archives and cleanup
321328
shell: pwsh
322329
run: |
323330
$ErrorActionPreference = 'Stop'
324331
$target = "${{ steps.toolset.outputs.target }}"
332+
$phpVersion = "${{ matrix.php }}"
333+
$tsMode = "${{ matrix.ts }}".ToUpper()
325334
326-
Write-Host "📂 Extracting downloaded archives..." -ForegroundColor Cyan
335+
Write-Host "📂 Extracting downloaded archives for PHP $phpVersion ($tsMode)..." -ForegroundColor Cyan
327336
328337
$zipFiles = Get-ChildItem -Path $target -Filter *.zip
329338
$zipCount = $zipFiles.Count
330339
331340
if ($zipCount -eq 0) {
332-
Write-Host "❌ No ZIP files found to extract" -ForegroundColor Red
341+
Write-Host "❌ No ZIP files found to extract for PHP $phpVersion ($tsMode)" -ForegroundColor Red
333342
throw "No archives to extract"
334343
}
335344
336-
Write-Host "🎯 Found $zipCount archives to extract" -ForegroundColor Yellow
345+
Write-Host "🎯 Found $zipCount archives to extract for PHP $phpVersion ($tsMode)" -ForegroundColor Yellow
337346
338347
$counter = 0
339348
$zipFiles | ForEach-Object {
@@ -345,9 +354,9 @@ jobs:
345354
}
346355
347356
Write-Host ""
348-
Write-Host "🧹 Cleaning up ZIP files..." -ForegroundColor Cyan
357+
Write-Host "🧹 Cleaning up ZIP files for PHP $phpVersion ($tsMode)..." -ForegroundColor Cyan
349358
Get-ChildItem -Path $target -Filter *.zip | Remove-Item -Force
350-
Write-Host "✅ Cleanup completed" -ForegroundColor Green
359+
Write-Host "✅ Cleanup completed for PHP $phpVersion ($tsMode)" -ForegroundColor Green
351360
352361
- name: 📦 Pack final result
353362
id: pack
@@ -359,7 +368,7 @@ jobs:
359368
$tool = "${{ steps.toolset.outputs.tool }}"
360369
$target = "${{ steps.toolset.outputs.target }}"
361370
362-
Write-Host "📦 Creating final extension pack..." -ForegroundColor Cyan
371+
Write-Host "📦 Creating final extension pack for PHP $php ($($ts.ToUpper()))..." -ForegroundColor Cyan
363372
364373
# Generate archive name: php-ext-pack-<php>-<ts>-Win32-<tool>-x64.zip
365374
$zipName = "php-ext-pack-$php-$ts-Win32-$tool-x64.zip"
@@ -374,7 +383,7 @@ jobs:
374383
Compress-Archive -Path (Join-Path $target '*') -DestinationPath $zipName
375384
376385
$archiveSize = [math]::Round((Get-Item $zipName).Length / 1MB, 2)
377-
Write-Host "✅ Archive created successfully ($archiveSize MB)" -ForegroundColor Green
386+
Write-Host "✅ Archive created successfully: $zipName ($archiveSize MB)" -ForegroundColor Green
378387
379388
Write-Output "zip=$zipName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
380389

0 commit comments

Comments
 (0)