Compare commits

...

5 Commits
2.3.0 ... 2.3.1

Author SHA1 Message Date
crazywhalecc
ca6d5da10f Remove redundant files and add tests for #504 bug 2024-07-19 23:52:20 +08:00
crazywhalecc
fbae0021a3 Bump version to 2.3.1 2024-07-19 23:52:20 +08:00
crazywhalecc
b52fe05363 Fix icu missing tool bug 2024-07-19 23:52:20 +08:00
crazywhalecc
c40e41cebe Fix extension test escape string for unix 2024-07-19 23:52:20 +08:00
crazywhalecc
3711db1093 Fix cur build on windows 2024-07-14 01:43:41 +08:00
8 changed files with 20 additions and 10 deletions

View File

@@ -176,7 +176,7 @@ jobs:
- name: "Run Build Tests (download)"
run: |
bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone --prefer-pre-built
bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone
- name: "Download pre-built libraries for pkg-config"
if: matrix.os != 'windows-latest'

View File

@@ -28,7 +28,7 @@ use Symfony\Component\Console\Application;
*/
final class ConsoleApplication extends Application
{
public const VERSION = '2.3.0';
public const VERSION = '2.3.1';
public function __construct()
{

View File

@@ -180,8 +180,8 @@ class Extension
if (file_exists(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php')) {
// Trim additional content & escape special characters to allow inline usage
$test = str_replace(
['<?php', 'declare(strict_types=1);', "\n", '"', '$'],
['', '', '', '\"', '\$'],
['<?php', 'declare(strict_types=1);', "\n", '"', '$', '!'],
['', '', '', '\"', '\$', '"\'!\'"'],
file_get_contents(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php')
);

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace SPC\builder\linux\library;
use SPC\store\FileSystem;
class icu extends LinuxLibraryBase
{
use \SPC\builder\unix\library\icu;
@@ -12,7 +14,7 @@ class icu extends LinuxLibraryBase
protected function build(): void
{
$cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"';
$cppflags = 'CPPFLAGS="-DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=1 -DU_STATIC_IMPLEMENTATION=1"';
$cxxflags = 'CXXFLAGS="-std=c++17"';
$ldflags = 'LDFLAGS="-static"';
shell()->cd($this->source_dir . '/source')
@@ -26,7 +28,7 @@ class icu extends LinuxLibraryBase
'--enable-extras=no ' .
'--enable-icuio=yes ' .
'--enable-dyload=no ' .
'--enable-tools=no ' .
'--enable-tools=yes ' .
'--enable-tests=no ' .
'--enable-samples=no ' .
'--prefix=' . BUILD_ROOT_PATH
@@ -36,5 +38,6 @@ class icu extends LinuxLibraryBase
->exec('make install');
$this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX);
FileSystem::removeDir(BUILD_LIB_PATH . '/icu');
}
}

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace SPC\builder\macos\library;
use SPC\store\FileSystem;
class icu extends MacOSLibraryBase
{
use \SPC\builder\unix\library\icu;
@@ -14,11 +16,12 @@ class icu extends MacOSLibraryBase
{
$root = BUILD_ROOT_PATH;
shell()->cd($this->source_dir . '/source')
->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --disable-tools --prefix={$root}")
->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --prefix={$root}")
->exec('make clean')
->exec("make -j{$this->builder->concurrency}")
->exec('make install');
$this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX);
FileSystem::removeDir(BUILD_LIB_PATH . '/icu');
}
}

View File

@@ -12,6 +12,7 @@ class curl extends WindowsLibraryBase
protected function build(): void
{
FileSystem::createDir(BUILD_BIN_PATH);
cmd()->cd($this->source_dir . '\winbuild')
->execWithWrapper(
$this->builder->makeSimpleWrapper('nmake'),

View File

@@ -3,3 +3,6 @@
declare(strict_types=1);
assert(class_exists(NumberFormatter::class));
assert(function_exists('locale_get_default'));
$fmt = new NumberFormatter('de-DE', NumberFormatter::DECIMAL);
assert(strval($fmt->parse('1.100')) === '1100');

View File

@@ -19,13 +19,13 @@ $upx = true;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'swoole,bz2,gmp,intl,password-argon2,gd,mbregex,iconv,redis,sodium,yaml,readline,openssl,sqlite3,sqlsrv,zip,zlib',
'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,swow,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib',
'Linux', 'Darwin' => 'intl',
'Windows' => 'amqp,apcu',
};
// 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' => 'brotli,bzip2,gmp,icu,libargon2,libavif,libcares,libevent,libiconv,liblz4,libpng,libsodium,libtiff,libwebp,libyaml,ncurses,onig,openssl,pkg-config,readline,sqlite,unixodbc,xz,zlib',
'Linux', 'Darwin' => '',
'Windows' => '',
};