Fix tests CI

This commit is contained in:
crazywhalecc
2024-10-04 15:49:57 +08:00
committed by Jerry Ma
parent 85df4731d1
commit 7facbc7a08

View File

@@ -94,6 +94,7 @@ if (PHP_OS_FAMILY === 'Windows') {
} }
// generate download command // generate download command
if ($argv[1] === 'download_cmd') {
$down_cmd = 'download '; $down_cmd = 'download ';
$down_cmd .= '--for-extensions="' . $final_extensions . '" '; $down_cmd .= '--for-extensions="' . $final_extensions . '" ';
$down_cmd .= '--for-libs="' . $final_libs . '" '; $down_cmd .= '--for-libs="' . $final_libs . '" ';
@@ -103,8 +104,10 @@ $down_cmd .= '--debug ';
$down_cmd .= '--retry=5 '; $down_cmd .= '--retry=5 ';
$down_cmd .= '--shallow-clone '; $down_cmd .= '--shallow-clone ';
$down_cmd .= $prefer_pre_built ? '--prefer-pre-built ' : ''; $down_cmd .= $prefer_pre_built ? '--prefer-pre-built ' : '';
}
// generate build command // generate build command
if ($argv[1] === 'build_cmd') {
$build_cmd = 'build '; $build_cmd = 'build ';
$build_cmd .= '"' . $final_extensions . '" '; $build_cmd .= '"' . $final_extensions . '" ';
$build_cmd .= $zts ? '--enable-zts ' : ''; $build_cmd .= $zts ? '--enable-zts ' : '';
@@ -114,6 +117,7 @@ $build_cmd .= $final_libs === '' ? '' : ('--with-libs="' . $final_libs . '" ');
$build_cmd .= '--build-cli --build-micro '; $build_cmd .= '--build-cli --build-micro ';
$build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm '; $build_cmd .= str_starts_with($argv[2], 'windows-') ? '' : '--build-fpm ';
$build_cmd .= '--debug '; $build_cmd .= '--debug ';
}
echo match ($argv[1]) { echo match ($argv[1]) {
'os' => json_encode($test_os), 'os' => json_encode($test_os),