fix(ci): load PHPX runtime during Windows packaging

master
韩天峰 3 weeks ago
parent 8a165aeced
commit 49c06a89c8
  1. 12
      .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 {

Loading…
Cancel
Save