mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Merge remote-tracking branch 'origin/main' into sapi/frankenphp
This commit is contained in:
commit
7dc3b7c8ac
12
.github/pull_request_template.md
vendored
12
.github/pull_request_template.md
vendored
@ -7,7 +7,11 @@
|
|||||||
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
|
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
|
||||||
> If a modification is not involved, please skip it directly.
|
> If a modification is not involved, please skip it directly.
|
||||||
|
|
||||||
- [ ] If you modified `*.php`, run `composer cs-fix` at local machine.
|
- If you modified `*.php` or `*.json`, run them locally to ensure your changes are valid:
|
||||||
- [ ] If it's an extension or dependency update, make sure adding related extensions in `src/global/test-extensions.php`.
|
- [ ] `PHP_CS_FIXER_IGNORE_ENV=1 composer cs-fix`
|
||||||
- [ ] If you changed the behavior of static-php-cli, update docs in `./docs/`.
|
- [ ] `composer analyse`
|
||||||
- [ ] If you updated `config/xxx.json` content, run `bin/spc dev:sort-config xxx`.
|
- [ ] `composer test`
|
||||||
|
- [ ] `bin/spc dev:sort-config`
|
||||||
|
- If it's an extension or dependency update, please ensure the following:
|
||||||
|
- [ ] Add your test combination to `src/globals/test-extensions.php`.
|
||||||
|
- [ ] If adding new or fixing bugs, add commit message containing `extension test` or `test extensions` to trigger full test suite.
|
||||||
|
|||||||
8
.github/workflows/ext-matrix-tests.yml
vendored
8
.github/workflows/ext-matrix-tests.yml
vendored
@ -1,16 +1,14 @@
|
|||||||
name: "Extension matrix tests"
|
name: "Extension Matrix Tests"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
push:
|
||||||
branches: [ "main" ]
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/ext-matrix-tests.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})"
|
name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})"
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
if: contains(github.event.head_commit.message, 'extension test') || contains(github.event.head_commit.message, 'test extensions')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
@ -71,8 +71,8 @@ CXX=${SPC_LINUX_DEFAULT_CXX}
|
|||||||
AR=${SPC_LINUX_DEFAULT_AR}
|
AR=${SPC_LINUX_DEFAULT_AR}
|
||||||
LD=ld.gold
|
LD=ld.gold
|
||||||
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
|
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
|
||||||
SPC_DEFAULT_C_FLAGS="-fpic -Os"
|
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
|
||||||
SPC_DEFAULT_CXX_FLAGS="-fpic -Os"
|
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
|
||||||
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
|
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
|
||||||
SPC_EXTRA_LIBS=
|
SPC_EXTRA_LIBS=
|
||||||
; upx executable path
|
; upx executable path
|
||||||
@ -92,7 +92,7 @@ SPC_CMD_VAR_PHP_EMBED_TYPE="static"
|
|||||||
|
|
||||||
; *** default build vars for building php ***
|
; *** default build vars for building php ***
|
||||||
; CFLAGS for configuring php
|
; CFLAGS for configuring php
|
||||||
SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS} -fpie"
|
SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS} -fPIE"
|
||||||
; CPPFLAGS for configuring php
|
; CPPFLAGS for configuring php
|
||||||
SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS="-I${BUILD_INCLUDE_PATH}"
|
SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS="-I${BUILD_INCLUDE_PATH}"
|
||||||
; LDFLAGS for configuring php
|
; LDFLAGS for configuring php
|
||||||
@ -100,7 +100,7 @@ SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}"
|
|||||||
; LIBS for configuring php
|
; LIBS for configuring php
|
||||||
SPC_CMD_VAR_PHP_CONFIGURE_LIBS="-ldl -lpthread -lm"
|
SPC_CMD_VAR_PHP_CONFIGURE_LIBS="-ldl -lpthread -lm"
|
||||||
; EXTRA_CFLAGS for `make` php
|
; EXTRA_CFLAGS for `make` php
|
||||||
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fpie ${SPC_DEFAULT_C_FLAGS}"
|
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE ${SPC_DEFAULT_C_FLAGS}"
|
||||||
; EXTRA_LIBS for `make` php
|
; EXTRA_LIBS for `make` php
|
||||||
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm"
|
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm"
|
||||||
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
|
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
|
||||||
|
|||||||
@ -42,6 +42,9 @@ build-options:
|
|||||||
# Set micro SAPI as win32 mode, without this, micro SAPI will be compiled as a console application (only for Windows, default: false)
|
# Set micro SAPI as win32 mode, without this, micro SAPI will be compiled as a console application (only for Windows, default: false)
|
||||||
enable-micro-win32: false
|
enable-micro-win32: false
|
||||||
|
|
||||||
|
# Build options for shared extensions (list or comma-separated are both accepted)
|
||||||
|
shared-extensions: [ ]
|
||||||
|
|
||||||
# Download options
|
# Download options
|
||||||
download-options:
|
download-options:
|
||||||
# Use custom url for specified sources, format: "{source-name}:{url}" (e.g. "php-src:https://example.com/php-8.4.0.tar.gz")
|
# Use custom url for specified sources, format: "{source-name}:{url}" (e.g. "php-src:https://example.com/php-8.4.0.tar.gz")
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class CraftCommand extends BaseCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
$static_extensions = implode(',', $craft['extensions']);
|
$static_extensions = implode(',', $craft['extensions']);
|
||||||
$shared_extensions = implode(',', $craft['shared-extensions']);
|
$shared_extensions = implode(',', $craft['shared-extensions'] ?? []);
|
||||||
$libs = implode(',', $craft['libs']);
|
$libs = implode(',', $craft['libs']);
|
||||||
|
|
||||||
// init log
|
// init log
|
||||||
|
|||||||
@ -164,6 +164,12 @@ class ConfigValidator
|
|||||||
if (is_string($craft['extensions'])) {
|
if (is_string($craft['extensions'])) {
|
||||||
$craft['extensions'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['extensions'])));
|
$craft['extensions'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['extensions'])));
|
||||||
}
|
}
|
||||||
|
if (!isset($craft['shared-extensions'])) {
|
||||||
|
$craft['shared-extensions'] = [];
|
||||||
|
}
|
||||||
|
if (is_string($craft['shared-extensions'] ?? [])) {
|
||||||
|
$craft['shared-extensions'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['shared-extensions'])));
|
||||||
|
}
|
||||||
// check libs
|
// check libs
|
||||||
if (isset($craft['libs']) && is_string($craft['libs'])) {
|
if (isset($craft['libs']) && is_string($craft['libs'])) {
|
||||||
$craft['libs'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['libs'])));
|
$craft['libs'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['libs'])));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user