mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
Merge branch 'main' into libedit
This commit is contained in:
4
.github/workflows/build-unix.yml
vendored
4
.github/workflows/build-unix.yml
vendored
@@ -136,12 +136,12 @@ jobs:
|
|||||||
macos-x86_64)
|
macos-x86_64)
|
||||||
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
||||||
BUILD_CMD="./bin/spc build"
|
BUILD_CMD="./bin/spc build"
|
||||||
RUNS_ON="macos-13"
|
RUNS_ON="macos-15-intel"
|
||||||
;;
|
;;
|
||||||
macos-aarch64)
|
macos-aarch64)
|
||||||
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
||||||
BUILD_CMD="./bin/spc build"
|
BUILD_CMD="./bin/spc build"
|
||||||
RUNS_ON="macos-14"
|
RUNS_ON="macos-15"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
|
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
|
||||||
|
|||||||
8
.github/workflows/ext-matrix-tests.yml
vendored
8
.github/workflows/ext-matrix-tests.yml
vendored
@@ -85,9 +85,9 @@ jobs:
|
|||||||
- "8.4"
|
- "8.4"
|
||||||
operating-system:
|
operating-system:
|
||||||
- "ubuntu-latest"
|
- "ubuntu-latest"
|
||||||
#- "macos-13"
|
#- "macos-15-intel"
|
||||||
#- "debian-arm64-self-hosted"
|
#- "debian-arm64-self-hosted"
|
||||||
- "macos-14"
|
- "macos-15"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
@@ -99,11 +99,11 @@ jobs:
|
|||||||
OS=""
|
OS=""
|
||||||
if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
|
if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
|
||||||
OS="linux-x86_64"
|
OS="linux-x86_64"
|
||||||
elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
|
elif [ "${{ matrix.operating-system }}" = "macos-15-intel" ]; then
|
||||||
OS="macos-x86_64"
|
OS="macos-x86_64"
|
||||||
elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
|
elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
|
||||||
OS="linux-aarch64"
|
OS="linux-aarch64"
|
||||||
elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then
|
elif [ "${{ matrix.operating-system }}" = "macos-15" ]; then
|
||||||
OS="macos-aarch64"
|
OS="macos-aarch64"
|
||||||
fi
|
fi
|
||||||
echo "OS=$OS" >> $GITHUB_ENV
|
echo "OS=$OS" >> $GITHUB_ENV
|
||||||
|
|||||||
6
.github/workflows/release-build.yml
vendored
6
.github/workflows/release-build.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
filename: "spc-linux-x86_64.tar.gz"
|
filename: "spc-linux-x86_64.tar.gz"
|
||||||
- name: "macos-x86_64"
|
- name: "macos-x86_64"
|
||||||
os: "macos-13"
|
os: "macos-15-intel"
|
||||||
filename: "spc-macos-x86_64.tar.gz"
|
filename: "spc-macos-x86_64.tar.gz"
|
||||||
- name: "linux-aarch64"
|
- name: "linux-aarch64"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
@@ -147,11 +147,11 @@ jobs:
|
|||||||
- name: "linux-x86_64"
|
- name: "linux-x86_64"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
- name: "macos-x86_64"
|
- name: "macos-x86_64"
|
||||||
os: "macos-13"
|
os: "macos-15-intel"
|
||||||
- name: "linux-aarch64"
|
- name: "linux-aarch64"
|
||||||
os: "ubuntu-24.04-arm"
|
os: "ubuntu-24.04-arm"
|
||||||
- name: "macos-aarch64"
|
- name: "macos-aarch64"
|
||||||
os: "macos-latest"
|
os: "macos-15"
|
||||||
- name: "windows-x64"
|
- name: "windows-x64"
|
||||||
os: "windows-latest"
|
os: "windows-latest"
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1152,8 +1152,9 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"BSD": "wip"
|
"BSD": "wip"
|
||||||
},
|
},
|
||||||
"type": "builtin",
|
"type": "external",
|
||||||
"arg-type": "with-path",
|
"source": "ext-zip",
|
||||||
|
"arg-type": "custom",
|
||||||
"arg-type-windows": "enable",
|
"arg-type-windows": "enable",
|
||||||
"lib-depends-unix": [
|
"lib-depends-unix": [
|
||||||
"libzip"
|
"libzip"
|
||||||
|
|||||||
@@ -263,6 +263,15 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ext-zip": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "https://pecl.php.net/get/zip",
|
||||||
|
"filename": "ext-zip.tgz",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ext-zstd": {
|
"ext-zstd": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"path": "php-src/ext/zstd",
|
"path": "php-src/ext/zstd",
|
||||||
@@ -890,7 +899,7 @@
|
|||||||
"postgresql": {
|
"postgresql": {
|
||||||
"type": "ghtagtar",
|
"type": "ghtagtar",
|
||||||
"repo": "postgres/postgres",
|
"repo": "postgres/postgres",
|
||||||
"match": "REL_16_\\d+",
|
"match": "REL_18_\\d+",
|
||||||
"license": {
|
"license": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "COPYRIGHT"
|
"path": "COPYRIGHT"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ use Symfony\Component\Console\Application;
|
|||||||
*/
|
*/
|
||||||
final class ConsoleApplication extends Application
|
final class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
public const string VERSION = '2.7.4';
|
public const string VERSION = '2.7.5';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|||||||
17
src/SPC/builder/extension/zip.php
Normal file
17
src/SPC/builder/extension/zip.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
|
use SPC\builder\Extension;
|
||||||
|
use SPC\util\CustomExt;
|
||||||
|
|
||||||
|
#[CustomExt('zip')]
|
||||||
|
class zip extends Extension
|
||||||
|
{
|
||||||
|
public function getUnixConfigureArg(bool $shared = false): string
|
||||||
|
{
|
||||||
|
return !$shared ? '--with-zip=' . BUILD_ROOT_PATH : '--enable-zip=shared';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -156,7 +156,14 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
}
|
}
|
||||||
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
|
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
|
||||||
if (!empty($shared_extensions)) {
|
if (!empty($shared_extensions)) {
|
||||||
logger()->info('Building shared extensions ...');
|
if (SPCTarget::isStatic()) {
|
||||||
|
throw new WrongUsageException(
|
||||||
|
"You're building against musl libc statically (the default on Linux), but you're trying to build shared extensions.\n" .
|
||||||
|
'Static musl libc does not implement `dlopen`, so your php binary is not able to load shared extensions.' . "\n" .
|
||||||
|
'Either use SPC_LIBC=glibc to link against glibc on a glibc OS, or use SPC_TARGET="native-native-musl -dynamic" to link against musl libc dynamically using `zig cc`.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
logger()->info('Building shared extensions...');
|
||||||
$this->buildSharedExts();
|
$this->buildSharedExts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,93 +4,83 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\builder\unix\library;
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
use SPC\builder\linux\library\LinuxLibraryBase;
|
|
||||||
use SPC\exception\BuildFailureException;
|
|
||||||
use SPC\exception\FileSystemException;
|
use SPC\exception\FileSystemException;
|
||||||
use SPC\store\FileSystem;
|
use SPC\store\FileSystem;
|
||||||
|
use SPC\util\PkgConfigUtil;
|
||||||
|
use SPC\util\SPCConfigUtil;
|
||||||
use SPC\util\SPCTarget;
|
use SPC\util\SPCTarget;
|
||||||
|
|
||||||
trait postgresql
|
trait postgresql
|
||||||
{
|
{
|
||||||
|
public function patchBeforeBuild(): bool
|
||||||
|
{
|
||||||
|
// fix aarch64 build on glibc 2.17 (e.g. CentOS 7)
|
||||||
|
if (SPCTarget::getLibcVersion() === '2.17' && GNU_ARCH === 'aarch64') {
|
||||||
|
try {
|
||||||
|
FileSystem::replaceFileStr("{$this->source_dir}/src/port/pg_popcount_aarch64.c", 'HWCAP_SVE', '0');
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
"{$this->source_dir}/src/port/pg_crc32c_armv8_choose.c",
|
||||||
|
'#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)',
|
||||||
|
'#if defined(__linux__) && !defined(HWCAP_CRC32)'
|
||||||
|
);
|
||||||
|
} catch (FileSystemException) {
|
||||||
|
// allow file not-existence to make it compatible with old and new version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
|
||||||
|
FileSystem::replaceFileStr("{$this->source_dir}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
|
||||||
|
// disable shared libs build
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
"{$this->source_dir}/src/Makefile.shlib",
|
||||||
|
[
|
||||||
|
'$(LINK.shared) -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)',
|
||||||
|
'$(INSTALL_SHLIB) $< \'$(DESTDIR)$(pkglibdir)/$(shlib)\'',
|
||||||
|
'$(INSTALL_SHLIB) $< \'$(DESTDIR)$(libdir)/$(shlib)\'',
|
||||||
|
'$(INSTALL_SHLIB) $< \'$(DESTDIR)$(bindir)/$(shlib)\'',
|
||||||
|
],
|
||||||
|
''
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
$builddir = BUILD_ROOT_PATH;
|
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies());
|
||||||
$envs = '';
|
$spc = new SPCConfigUtil($this->getBuilder(), ['no_php' => true, 'libs_only_deps' => true]);
|
||||||
$packages = 'zlib openssl readline libxml-2.0';
|
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs'));
|
||||||
$optional_packages = [
|
|
||||||
'zstd' => 'libzstd',
|
$env_vars = [
|
||||||
'ldap' => 'ldap',
|
'CFLAGS' => $config['cflags'],
|
||||||
'libxslt' => 'libxslt',
|
'CPPFLAGS' => '-DPIC',
|
||||||
'icu' => 'icu-i18n',
|
'LDFLAGS' => $config['ldflags'],
|
||||||
|
'LIBS' => $config['libs'],
|
||||||
];
|
];
|
||||||
$error_exec_cnt = 0;
|
|
||||||
|
|
||||||
foreach ($optional_packages as $lib => $pkg) {
|
if ($ldLibraryPath = getenv('SPC_LD_LIBRARY_PATH')) {
|
||||||
if ($this->getBuilder()->getLib($lib)) {
|
$env_vars['LD_LIBRARY_PATH'] = $ldLibraryPath;
|
||||||
$packages .= ' ' . $pkg;
|
|
||||||
$output = shell()->execWithResult("pkg-config --static {$pkg}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
logger()->info(var_export($output[1], true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = shell()->execWithResult("pkg-config --cflags-only-I --static {$packages}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
$macos_15_bug_cflags = PHP_OS_FAMILY === 'Darwin' ? ' -Wno-unguarded-availability-new' : '';
|
|
||||||
$cflags = '';
|
|
||||||
if (!empty($output[1][0])) {
|
|
||||||
$cflags = $output[1][0];
|
|
||||||
$envs .= ' CPPFLAGS="-DPIC"';
|
|
||||||
$cflags = "{$cflags} -fno-ident{$macos_15_bug_cflags}";
|
|
||||||
}
|
|
||||||
$output = shell()->execWithResult("pkg-config --libs-only-L --static {$packages}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
if (!empty($output[1][0])) {
|
|
||||||
$ldflags = $output[1][0];
|
|
||||||
$envs .= SPCTarget::isStatic() ? " LDFLAGS=\"{$ldflags} -static\" " : " LDFLAGS=\"{$ldflags}\" ";
|
|
||||||
}
|
|
||||||
$output = shell()->execWithResult("pkg-config --libs-only-l --static {$packages}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
if (!empty($output[1][0])) {
|
|
||||||
$libs = $output[1][0];
|
|
||||||
$libcpp = '';
|
|
||||||
if ($this->builder->getLib('icu')) {
|
|
||||||
$libcpp = $this instanceof LinuxLibraryBase ? ' -lstdc++' : ' -lc++';
|
|
||||||
}
|
|
||||||
$envs .= " LIBS=\"{$libs}{$libcpp}\" ";
|
|
||||||
}
|
|
||||||
if ($error_exec_cnt > 0) {
|
|
||||||
throw new BuildFailureException('Failed to get pkg-config information!');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSystem::resetDir($this->source_dir . '/build');
|
FileSystem::resetDir($this->source_dir . '/build');
|
||||||
|
|
||||||
$version = $this->getVersion();
|
// php source relies on the non-private encoding functions in libpgcommon.a
|
||||||
// 16.1 workaround
|
FileSystem::replaceFileStr(
|
||||||
if (version_compare($version, '16.1') >= 0) {
|
"{$this->source_dir}/src/common/Makefile",
|
||||||
# 有静态链接配置 参考文件: src/interfaces/libpq/Makefile
|
'$(OBJS_FRONTEND): CPPFLAGS += -DUSE_PRIVATE_ENCODING_FUNCS',
|
||||||
shell()->cd($this->source_dir . '/build')
|
'$(OBJS_FRONTEND): CPPFLAGS += -UUSE_PRIVATE_ENCODING_FUNCS -DFRONTEND',
|
||||||
->exec('sed -i.backup "s/invokes exit\'; exit 1;/invokes exit\';/" ../src/interfaces/libpq/Makefile')
|
);
|
||||||
->exec('sed -i.backup "278 s/^/# /" ../src/Makefile.shlib')
|
|
||||||
->exec('sed -i.backup "402 s/^/# /" ../src/Makefile.shlib');
|
|
||||||
} else {
|
|
||||||
throw new BuildFailureException('Unsupported version for postgresql: ' . $version . ' !');
|
|
||||||
}
|
|
||||||
|
|
||||||
// configure
|
// configure
|
||||||
shell()->cd($this->source_dir . '/build')->initializeEnv($this)
|
$shell = shell()->cd("{$this->source_dir}/build")->initializeEnv($this)
|
||||||
->appendEnv(['CFLAGS' => $cflags])
|
->appendEnv($env_vars)
|
||||||
->exec(
|
->exec(
|
||||||
"{$envs} ../configure " .
|
'../configure ' .
|
||||||
"--prefix={$builddir} " .
|
"--prefix={$this->getBuildRootPath()} " .
|
||||||
($this->builder->getOption('enable-zts') ? '--enable-thread-safety ' : '--disable-thread-safety ') .
|
|
||||||
'--enable-coverage=no ' .
|
'--enable-coverage=no ' .
|
||||||
'--with-ssl=openssl ' .
|
'--with-ssl=openssl ' .
|
||||||
'--with-readline ' .
|
'--with-readline ' .
|
||||||
'--with-libxml ' .
|
'--with-libxml ' .
|
||||||
($this->builder->getLib('icu') ? '--with-icu ' : '--without-icu ') .
|
($this->builder->getLib('icu') ? '--with-icu ' : '--without-icu ') .
|
||||||
($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') .
|
($this->builder->getLib('ldap') ? '--with-ldap ' : '--without-ldap ') .
|
||||||
// '--without-ldap ' .
|
|
||||||
($this->builder->getLib('libxslt') ? '--with-libxslt ' : '--without-libxslt ') .
|
($this->builder->getLib('libxslt') ? '--with-libxslt ' : '--without-libxslt ') .
|
||||||
($this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd ') .
|
($this->builder->getLib('zstd') ? '--with-zstd ' : '--without-zstd ') .
|
||||||
'--without-lz4 ' .
|
'--without-lz4 ' .
|
||||||
@@ -99,32 +89,29 @@ trait postgresql
|
|||||||
'--without-pam ' .
|
'--without-pam ' .
|
||||||
'--without-bonjour ' .
|
'--without-bonjour ' .
|
||||||
'--without-tcl '
|
'--without-tcl '
|
||||||
)
|
);
|
||||||
->exec($envs . ' make -C src/bin/pg_config install')
|
|
||||||
->exec($envs . ' make -C src/include install')
|
// patch ldap lib
|
||||||
->exec($envs . ' make -C src/common install')
|
if ($this->builder->getLib('ldap')) {
|
||||||
->exec($envs . ' make -C src/port install')
|
$libs = PkgConfigUtil::getLibsArray('ldap');
|
||||||
->exec($envs . ' make -C src/interfaces/libpq install');
|
$libs = clean_spaces(implode(' ', $libs));
|
||||||
|
FileSystem::replaceFileStr($this->source_dir . '/build/config.status', '-lldap', $libs);
|
||||||
|
FileSystem::replaceFileStr($this->source_dir . '/build/src/Makefile.global', '-lldap', $libs);
|
||||||
|
}
|
||||||
|
|
||||||
|
$shell
|
||||||
|
->exec('make -C src/bin/pg_config install')
|
||||||
|
->exec('make -C src/include install')
|
||||||
|
->exec('make -C src/common install')
|
||||||
|
->exec('make -C src/port install')
|
||||||
|
->exec('make -C src/interfaces/libpq install');
|
||||||
|
|
||||||
// remove dynamic libs
|
// remove dynamic libs
|
||||||
shell()->cd($this->source_dir . '/build')
|
shell()->cd($this->source_dir . '/build')
|
||||||
->exec("rm -rf {$builddir}/lib/*.so.*")
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.so.*")
|
||||||
->exec("rm -rf {$builddir}/lib/*.so")
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.so")
|
||||||
->exec("rm -rf {$builddir}/lib/*.dylib");
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.dylib");
|
||||||
|
|
||||||
FileSystem::replaceFileStr(BUILD_LIB_PATH . '/pkgconfig/libpq.pc', '-lldap', '-lldap -llber');
|
FileSystem::replaceFileStr("{$this->getLibDir()}/pkgconfig/libpq.pc", '-lldap', '-lldap -llber');
|
||||||
}
|
|
||||||
|
|
||||||
private function getVersion(): string
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$file = FileSystem::readFile($this->source_dir . '/meson.build');
|
|
||||||
if (preg_match("/^\\s+version:\\s?'(.*)'/m", $file, $match)) {
|
|
||||||
return $match[1];
|
|
||||||
}
|
|
||||||
return 'unknown';
|
|
||||||
} catch (FileSystemException) {
|
|
||||||
return 'unknown';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class PhpSource extends CustomSourceBase
|
|||||||
{
|
{
|
||||||
$major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.4';
|
$major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.4';
|
||||||
if ($major === '8.5') {
|
if ($major === '8.5') {
|
||||||
Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://downloads.php.net/~edorian/php-8.5.0beta3.tar.xz'], $force);
|
Downloader::downloadSource('php-src', ['type' => 'url', 'url' => 'https://github.com/php/php-src/archive/refs/tags/php-8.5.0RC2.tar.gz'], $force);
|
||||||
} elseif ($major === 'git') {
|
} elseif ($major === 'git') {
|
||||||
Downloader::downloadSource('php-src', ['type' => 'git', 'url' => 'https://github.com/php/php-src.git', 'rev' => 'master'], $force);
|
Downloader::downloadSource('php-src', ['type' => 'git', 'url' => 'https://github.com/php/php-src.git', 'rev' => 'master'], $force);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,10 +21,9 @@ $test_php_version = [
|
|||||||
// 'git',
|
// 'git',
|
||||||
];
|
];
|
||||||
|
|
||||||
// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available)
|
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
|
||||||
$test_os = [
|
$test_os = [
|
||||||
// 'macos-13', // bin/spc for x86_64
|
'macos-15-intel', // bin/spc for x86_64
|
||||||
'macos-14', // bin/spc for arm64
|
|
||||||
'macos-15', // bin/spc for arm64
|
'macos-15', // bin/spc for arm64
|
||||||
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
||||||
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
||||||
@@ -35,7 +34,7 @@ $test_os = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// whether enable thread safe
|
// whether enable thread safe
|
||||||
$zts = true;
|
$zts = false;
|
||||||
|
|
||||||
$no_strip = false;
|
$no_strip = false;
|
||||||
|
|
||||||
@@ -50,13 +49,13 @@ $prefer_pre_built = false;
|
|||||||
|
|
||||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||||
$extensions = match (PHP_OS_FAMILY) {
|
$extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'readline',
|
'Linux', 'Darwin' => 'pdo_pgsql',
|
||||||
'Windows' => 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pdo,pdo_mysql,pdo_sqlite,phar,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip',
|
'Windows' => 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pdo,pdo_mysql,pdo_sqlite,phar,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip',
|
||||||
};
|
};
|
||||||
|
|
||||||
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
||||||
$shared_extensions = match (PHP_OS_FAMILY) {
|
$shared_extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux' => 'grpc,imagick',
|
'Linux' => '',
|
||||||
'Darwin' => '',
|
'Darwin' => '',
|
||||||
'Windows' => '',
|
'Windows' => '',
|
||||||
};
|
};
|
||||||
@@ -156,17 +155,13 @@ if ($shared_extensions) {
|
|||||||
switch ($argv[2] ?? null) {
|
switch ($argv[2] ?? null) {
|
||||||
case 'ubuntu-22.04':
|
case 'ubuntu-22.04':
|
||||||
case 'ubuntu-22.04-arm':
|
case 'ubuntu-22.04-arm':
|
||||||
|
case 'macos-15':
|
||||||
|
case 'macos-15-intel':
|
||||||
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
||||||
break;
|
break;
|
||||||
case 'ubuntu-24.04':
|
case 'ubuntu-24.04':
|
||||||
case 'ubuntu-24.04-arm':
|
case 'ubuntu-24.04-arm':
|
||||||
break;
|
break;
|
||||||
case 'macos-13':
|
|
||||||
case 'macos-14':
|
|
||||||
case 'macos-15':
|
|
||||||
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
|
||||||
$no_strip = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$shared_cmd = '';
|
$shared_cmd = '';
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user