Fix windows curl build >= 8.3 (#660)

* Test windows curl

* Test windows curl

* Fix windows curl build for PHP 8.3 and 8.4
This commit is contained in:
Jerry Ma 2025-03-20 09:22:10 +08:00 committed by GitHub
parent 8a4ba7a876
commit 0bc143cac3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 9 deletions

View File

@ -68,7 +68,7 @@
"libcurl.a"
],
"static-libs-windows": [
"libcurl.lib"
"libcurl_a.lib"
],
"headers": [
"curl"

View File

@ -48,5 +48,7 @@ class curl extends WindowsLibraryBase
$this->builder->makeSimpleWrapper('cmake'),
"--build cmakebuild --config Release --target install -j{$this->builder->concurrency}"
);
// move libcurl.lib to libcurl_a.lib
rename(BUILD_LIB_PATH . '\libcurl.lib', BUILD_LIB_PATH . '\libcurl_a.lib');
}
}

View File

@ -13,18 +13,18 @@ declare(strict_types=1);
// test php version
$test_php_version = [
// '8.1',
// '8.2',
'8.1',
'8.2',
'8.3',
'8.4',
];
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
$test_os = [
'macos-13',
'macos-14',
'ubuntu-latest',
// 'windows-latest',
// 'macos-13',
// 'macos-14',
// 'ubuntu-latest',
'windows-latest',
];
// whether enable thread safe
@ -41,13 +41,13 @@ $prefer_pre_built = false;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'gd',
'Windows' => 'bcmath',
'Windows' => 'bz2,ctype,curl,dom,filter,gd,iconv,mbstring,opcache,openssl,pdo,pdo_sqlite,phar,session,simplexml,sqlite3,tokenizer,xml,xmlwriter,yaml,zip,zlib',
};
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
$with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'freetype',
'Windows' => '',
'Windows' => 'libjpeg,libavif,freetype,libwebp',
};
// Please change your test base combination. We recommend testing with `common`.