Skip to content

Commit 6b5cc7f

Browse files
committed
Update ext.yml
1 parent eb4d168 commit 6b5cc7f

File tree

1 file changed

+83
-43
lines changed

1 file changed

+83
-43
lines changed

β€Ž.github/workflows/ext.ymlβ€Ž

Lines changed: 83 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -390,46 +390,74 @@ jobs:
390390
"blackfire" = @{
391391
"name" = "Blackfire"
392392
"urls" = @{
393-
"7.2" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/72"
394-
"7.3" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/73"
395-
"7.4" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/74"
396-
"8.0" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/80"
397-
"8.1" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/81"
398-
"8.2" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/82"
399-
"8.3" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/83"
400-
"8.4" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/84"
393+
"nts" = @{
394+
"7.2" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/72"
395+
"7.3" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/73"
396+
"7.4" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/74"
397+
"8.0" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/80"
398+
"8.1" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/81"
399+
"8.2" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/82"
400+
"8.3" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/83"
401+
"8.4" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/84"
402+
}
403+
"ts" = @{
404+
"7.2" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/72-zts"
405+
"7.3" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/73-zts"
406+
"7.4" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/74-zts"
407+
"8.0" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/80-zts"
408+
"8.1" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/81-zts"
409+
"8.2" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/82-zts"
410+
"8.3" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/83-zts"
411+
"8.4" = "https://blackfire.io/api/v1/releases/probe/php/windows/amd64/84-zts"
412+
}
401413
}
402414
"dll_name" = "blackfire_php.dll"
403415
"target_name" = "php_blackfire.dll"
416+
"process_additional_files" = $true
404417
}
405418
"ioncube" = @{
406419
"name" = "Ioncube"
407420
"urls" = @{
408-
"7.2" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc15_x86-64.zip"
409-
"7.3" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc15_x86-64.zip"
410-
"7.4" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc15_x86-64.zip"
411-
"8.1" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc16_x86-64.zip"
412-
"8.2" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc16_x86-64.zip"
413-
"8.3" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc16_x86-64.zip"
414-
"8.4" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc17_x86-64.zip"
421+
"nts" = @{
422+
"7.2" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc15_x86-64.zip"
423+
"7.3" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc15_x86-64.zip"
424+
"7.4" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc15_x86-64.zip"
425+
"8.1" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc16_x86-64.zip"
426+
"8.2" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc16_x86-64.zip"
427+
"8.3" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc16_x86-64.zip"
428+
"8.4" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_nonts_vc17_x86-64.zip"
429+
}
430+
"ts" = @{
431+
"7.2" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc15_x86-64.zip"
432+
"7.3" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc15_x86-64.zip"
433+
"7.4" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc15_x86-64.zip"
434+
"8.1" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc16_x86-64.zip"
435+
"8.2" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc16_x86-64.zip"
436+
"8.3" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc16_x86-64.zip"
437+
"8.4" = "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc17_x86-64.zip"
438+
}
415439
}
416440
"dll_name" = "ioncube_loader_win_$phpVersion.dll"
417441
"target_name" = "php_ioncube.dll"
442+
"process_additional_files" = $true
418443
}
419444
"firebird" = @{
420-
"name" = "Firebird"
445+
"name" = "Firebird Client"
421446
"urls" = @{
422-
"7.3" = "https://github.com/FirebirdSQL/firebird/releases/download/v3.0.13/Firebird-3.0.13.33818-0-x64.zip"
423-
"7.4" = "https://github.com/FirebirdSQL/firebird/releases/download/v3.0.13/Firebird-3.0.13.33818-0-x64.zip"
424-
"8.0" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
425-
"8.1" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
426-
"8.2" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
427-
"8.3" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
428-
"8.4" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
447+
"common" = @{
448+
"7.3" = "https://github.com/FirebirdSQL/firebird/releases/download/v3.0.13/Firebird-3.0.13.33818-0-x64.zip"
449+
"7.4" = "https://github.com/FirebirdSQL/firebird/releases/download/v3.0.13/Firebird-3.0.13.33818-0-x64.zip"
450+
"8.0" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
451+
"8.1" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
452+
"8.2" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
453+
"8.3" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
454+
"8.4" = "https://github.com/FirebirdSQL/firebird/releases/download/v4.0.6/Firebird-4.0.6.3221-0-x64.zip"
455+
}
429456
}
430457
"dll_name" = "fbclient.dll"
431458
"target_name" = "fbclient.dll"
432-
"target_location" = "root" # Special flag for root directory
459+
"target_location" = "root"
460+
"process_additional_files" = $false
433461
}
434462
}
435463
@@ -441,21 +469,23 @@ jobs:
441469
$extName = $config.name
442470
443471
Write-Host ""
444-
Write-Host "πŸ”₯ Processing $extName extension..." -ForegroundColor Yellow
445-
446-
# Check if URL exists for this PHP version
447-
if (-not $config.urls.ContainsKey($phpVersion)) {
448-
Write-Host "⚠️ Skipping $extName: No URL configured for PHP $phpVersion" -ForegroundColor Yellow
449-
continue
472+
Write-Host "πŸ”₯ Processing $extName..." -ForegroundColor Yellow
473+
474+
# Determine which URL structure to use
475+
$urlSource = $null
476+
if ($config.urls.ContainsKey($tsMode)) {
477+
$urlSource = $config.urls[$tsMode]
478+
} elseif ($config.urls.ContainsKey("common")) {
479+
$urlSource = $config.urls["common"]
450480
}
451481
452-
# Skip Ioncube for TS mode (only NTS supported)
453-
if ($extKey -eq "ioncube" -and $tsMode -eq "ts") {
454-
Write-Host "⚠️ Skipping $extName: Only NTS mode supported" -ForegroundColor Yellow
482+
# Check if URL exists for this PHP version and TS mode
483+
if (-not $urlSource -or -not $urlSource.ContainsKey($phpVersion)) {
484+
Write-Host "⚠️ Skipping ${extName}: No URL configured for PHP $phpVersion ($($tsMode.ToUpper()))" -ForegroundColor Yellow
455485
continue
456486
}
457487
458-
$url = $config.urls[$phpVersion]
488+
$url = $urlSource[$phpVersion]
459489
$dllName = $config.dll_name
460490
$targetName = $config.target_name
461491
@@ -464,7 +494,8 @@ jobs:
464494
$tmpDir = "$env:TEMP\${extKey}_$(Get-Random)"
465495
$archivePath = if ($url.EndsWith(".zip")) { "$tmpDir.zip" } else { "$tmpDir.archive" }
466496
467-
Write-Host "πŸ“₯ Downloading $extName from: $url" -ForegroundColor Gray
497+
Write-Host "πŸ“₯ Downloading $extName for PHP $phpVersion ($($tsMode.ToUpper()))..." -ForegroundColor Gray
498+
Write-Host "πŸ”— $url" -ForegroundColor DarkGray
468499
469500
# Download archive
470501
Invoke-WebRequest -Uri $url -OutFile $archivePath -UseBasicParsing -ErrorAction Stop
@@ -493,7 +524,11 @@ jobs:
493524
Select-Object -First 1
494525
495526
if (-not $dllFile) {
496-
Write-Host "❌ $extName: DLL file '$dllName' not found in archive" -ForegroundColor Red
527+
Write-Host "❌ ${extName}: DLL file '$dllName' not found in archive" -ForegroundColor Red
528+
Write-Host "πŸ“‹ Available files in archive:" -ForegroundColor DarkGray
529+
Get-ChildItem -Path $tmpDir -File -Recurse | ForEach-Object {
530+
Write-Host " - $($_.Name)" -ForegroundColor DarkGray
531+
}
497532
$failCount++
498533
continue
499534
}
@@ -512,8 +547,8 @@ jobs:
512547
$dllSize = [math]::Round((Get-Item $targetDllPath).Length / 1KB, 2)
513548
Write-Host "βœ… Copied $targetName ($dllSize KB)" -ForegroundColor Green
514549
515-
# Process remaining files (move to 3rd-party directory)
516-
if ($extKey -ne "firebird") { # Firebird doesn't need 3rd-party files
550+
# Process remaining files (move to 3rd-party directory) - only for extensions that need it
551+
if ($config.process_additional_files) {
517552
$extThirdPartyDir = Join-Path $thirdPartyDir $extKey
518553
519554
if (-not (Test-Path $extThirdPartyDir)) {
@@ -538,24 +573,29 @@ jobs:
538573
Copy-Item -Path $file.FullName -Destination $targetPath -Force
539574
$movedCount++
540575
} catch {
541-
Write-Host "⚠️ Error copying file $($file.Name): $_" -ForegroundColor Yellow
576+
Write-Host "⚠️ Error copying file $($file.Name)" -ForegroundColor Yellow
542577
}
543578
}
544579
545580
if ($movedCount -gt 0) {
546581
Write-Host "πŸ“ Moved $movedCount additional files to 3rd-party/$extKey" -ForegroundColor Green
582+
} else {
583+
Write-Host "πŸ“ No additional files to process for $extName" -ForegroundColor Gray
547584
}
585+
} else {
586+
Write-Host "πŸ“ Skipping additional files processing for $extName (only DLL needed)" -ForegroundColor Gray
548587
}
549588
550589
# Cleanup temporary files
551590
Remove-Item $tmpDir, $archivePath -Recurse -Force -ErrorAction SilentlyContinue
552591
553-
Write-Host "βœ… $extName extension processed successfully" -ForegroundColor Green
592+
Write-Host "βœ… $extName processed successfully" -ForegroundColor Green
554593
$successCount++
555594
556595
} catch {
557-
Write-Host "❌ Error processing $extName extension: $_" -ForegroundColor Red
558-
Write-Host "πŸ”— URL: $url" -ForegroundColor DarkGray
596+
Write-Host "❌ Error processing $extName" -ForegroundColor Red
597+
Write-Host "πŸ”— URL was: $url" -ForegroundColor DarkGray
598+
Write-Host "πŸ’₯ Error: $($_.Exception.Message)" -ForegroundColor Red
559599
$failCount++
560600
561601
# Cleanup on error
@@ -565,7 +605,7 @@ jobs:
565605
566606
Write-Host ""
567607
Write-Host "πŸ“Š Additional Extensions Summary for PHP $phpVersion ($($tsMode.ToUpper()))" -ForegroundColor Cyan
568-
Write-Host "=================================================" -ForegroundColor Cyan
608+
Write-Host "=================================================================" -ForegroundColor Cyan
569609
Write-Host "βœ… Successful: $successCount extensions" -ForegroundColor Green
570610
Write-Host "❌ Failed: $failCount extensions" -ForegroundColor $(if ($failCount -gt 0) { 'Red' } else { 'Green' })
571611
Write-Host ""

0 commit comments

Comments
Β (0)