From 49c06a89c8ac15f64c1150b9cda9b9d17297eb88 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Mon, 21 Sep 2026 18:17:02 +0800 Subject: [PATCH] fix(ci): load PHPX runtime during Windows packaging --- .github/workflows/windows-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 05aa47c0..46e0908a 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -395,6 +395,7 @@ jobs: run: | $ErrorActionPreference = 'Stop' $env:PHPRC = Join-Path $env:PHP_HOME 'php.ini' + $env:PATH = "$env:PHPX_HOME\build;$env:PATH" composer install --no-dev --prefer-dist --no-progress --classmap-authoritative if ($LASTEXITCODE -ne 0) { @@ -433,6 +434,7 @@ jobs: } $root = $roots[0].FullName $phpExe = Join-Path $root 'php.exe' + $compilerExe = Join-Path $root 'tpc.exe' $phpIni = Join-Path $root 'php.ini' $checkFile = Join-Path $destination 'check-php-ini.php' $check = @' @@ -448,6 +450,16 @@ jobs: try { # Ignore the runner's extra ini files; test the relocated package. $env:PHP_INI_SCAN_DIR = '' + Push-Location $root + try { + $compilerOutput = (& $compilerExe --version 2>&1 | Out-String).Trim() + if ($LASTEXITCODE -ne 0) { + throw "Relocated TypePHP compiler failed: $compilerOutput" + } + Write-Host "Relocated TypePHP compiler: $compilerOutput" + } finally { + Pop-Location + } foreach ($workingDirectory in @($root, $destination)) { Push-Location $workingDirectory try {