Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5c43733
swow 更新到v1.6.2
jingjingxyk Nov 13, 2025
b9839e3
使用 pie.phar 下载扩展 (#1034)
jingjingxyk Nov 14, 2025
255f6ab
coscli set upload log (#1031)
jingjingxyk Nov 14, 2025
1415f67
update workflow config
jingjingxyk Nov 14, 2025
83a339a
add kcm2 libdeflate_prefix
jingjingxyk Nov 15, 2025
26aba28
面子挂不住
jingjingxyk Nov 15, 2025
82def05
fix merge code error
jingjingxyk Nov 15, 2025
3a76a9d
添加下载phpy扩展 用于动态版 swoole-cli (#1035)
jingjingxyk Nov 17, 2025
ad6aaa4
imagemagick enable libdeflate
jingjingxyk Nov 17, 2025
792a89e
Merge branch 'feature-libheif-libavif' into experiment-feature
jingjingxyk Nov 17, 2025
8f2aaf1
merge code
jingjingxyk Nov 17, 2025
448784f
merge code
jingjingxyk Nov 17, 2025
7280df6
Update cos script --filter=[]
matyhtf Nov 17, 2025
713605a
解决 clone swoole 源码时,分支名称包含/,导致打包异常 (#1038)
jingjingxyk Nov 18, 2025
ad5d80f
启用支持avif 图片格式
jingjingxyk Nov 19, 2025
90c58a9
update libavif 版本
jingjingxyk Nov 19, 2025
9c69690
merge code
jingjingxyk Nov 19, 2025
b114435
merge code
jingjingxyk Nov 19, 2025
6e5aaba
merge code
jingjingxyk Nov 19, 2025
b01b9a9
merge code
jingjingxyk Nov 19, 2025
6a493c9
merge code
jingjingxyk Nov 19, 2025
31e6656
Merge branch 'feature-enable-support-avif' into experiment-feature
jingjingxyk Nov 19, 2025
38dffde
Merge branch 'experiment-feature' into build_native_php
jingjingxyk Nov 19, 2025
b3bf50d
update
jingjingxyk Nov 19, 2025
302cd6e
update
jingjingxyk Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev

php prepare.php --with-static-pie +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --with-static-pie --with-libavif +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }}

bash make-install-deps.sh

Expand All @@ -142,10 +142,13 @@ jobs:
run: |
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri curl
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri imagick
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
{ ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php } || { echo $? }
{ ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php ; } || { echo $? ; } ;
file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v | head -n 1 | awk '{print $2}')
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev

php prepare.php --with-static-pie +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid ${{ inputs.build_type }} ${{ inputs.build_options }} --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --with-static-pie --with-libavif +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid ${{ inputs.build_type }} ${{ inputs.build_options }} --with-php-version=${{ env.BUILD_PHP_VERSION }}

bash make-install-deps.sh

Expand All @@ -202,11 +202,14 @@ jobs:
run: |
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri curl
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri imagick
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v
{ ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php } || { echo $? }
{ ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php ; } || { echo $? ; } ;
file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v | head -n 1 | awk '{print $2}')
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile

php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --without-docker=1 --with-libavif +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }}

- name: Build
run: |
Expand All @@ -137,7 +137,9 @@ jobs:
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri curl
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri imagick
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev

php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --without-docker=1 --with-libavif +apcu +ds +xlswriter +ssh2 +pgsql +uuid --with-php-version=${{ env.BUILD_PHP_VERSION }}

- name: Build
run: |
Expand All @@ -149,7 +149,9 @@ jobs:
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri curl
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri imagick
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
key: "${{ runner.os }}-build-pool-cache"

- name: Install Cygwin
uses: cygwin/cygwin-install-action@v2
uses: cygwin/cygwin-install-action@v6
with:
site: https://mirrors.kernel.org/sourceware/cygwin/
# with:
Expand All @@ -75,7 +75,7 @@ jobs:
# 备注:github action 在 windows 上执行命令默认的 shell 是 powershell,如果要使用其它shell , 需要手动指定,例如此也可以使用 bash 来安装 cygwin packages
if: 1
run: |
Copy-Item -Path "C:\setup.exe" -Destination "${{ github.workspace }}\setup-x86_64.exe"
Copy-Item -Path "d:\setup.exe" -Destination "${{ github.workspace }}\setup-x86_64.exe"
cmd /c .\sapi\quickstart\windows\cygwin-build\install-cygwin.bat

- name: Install re2c
Expand All @@ -86,7 +86,9 @@ jobs:
- name: install deps lib with source code
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
run: |
bash sapi/scripts/msys2/install-libzip.sh
bash ./sapi/scripts/msys2/install-libzip.sh
bash ./sapi/scripts/msys2/install-libyuv.sh
bash ./sapi/scripts/msys2/install-libavif.sh

- name: Prepare
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
Expand Down Expand Up @@ -116,7 +118,8 @@ jobs:
./bin/php.exe --ri swoole
./bin/php.exe --ri zip
./bin/php.exe --ri gd
./bin/php.exe -r "echo PHP_VERSION;"
./bin/php.exe --ri imagick
./bin/php.exe -r "echo PHP_VERSION;echo PHP_EOL;"
./bin/php.exe -r "echo getcwd();echo PHP_EOL;"
ldd ./bin/php.exe

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
./bin/php.exe --ri openssl
./bin/php.exe --ri swoole
./bin/php.exe --ri zip
# ./bin/php.exe --ri gd
# ./bin/php.exe --ri imagick
./bin/php.exe -r "echo PHP_VERSION;"
./bin/php.exe -r "echo getcwd();echo PHP_EOL;"
ldd ./bin/php.exe
Expand Down
5 changes: 4 additions & 1 deletion sapi/quickstart/windows/cygwin-build/install-cygwin.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ if defined GITHUB_ACTIONS (

:: package separate with commas
set "PACKAGES=make,git,curl,wget,tar,libtool,bison,gcc-g++,autoconf,automake"
set "PACKAGES=%PACKAGES%,cmake,openssl,binutils"
set "PACKAGES=%PACKAGES%,cmake,openssl,binutils,xz"
set "PACKAGES=%PACKAGES%,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel"
set "PACKAGES=%PACKAGES%,libssh2-devel,libidn2-devel"
set "PACKAGES=%PACKAGES%,libgmp-devel,libsqlite3-devel,libpcre-devel,libpcre2-devel"
set "PACKAGES=%PACKAGES%,libiconv-devel"
set "PACKAGES=%PACKAGES%,libMagick-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel"
set "PACKAGES=%PACKAGES%,libaom-devel,libsvtav1-devel,libdav1d-devel,libheif-devel"
set "PACKAGES=%PACKAGES%,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel"
set "PACKAGES=%PACKAGES%,libzstd-devel,libbrotli-devel"
set "PACKAGES=%PACKAGES%,zip,unzip,xz"
Expand All @@ -53,6 +54,8 @@ set "PACKAGES=%PACKAGES%,flex"
set "PACKAGES=%PACKAGES%,cygwin-devel,libnet6-devel"
set "PACKAGES=%PACKAGES%,libwrap-devel"
set "PACKAGES=%PACKAGES%,libedit-devel"
set "PACKAGES=%PACKAGES%,liblzma-devel"
set "PACKAGES=%PACKAGES%,gettext-devel"


set "OPTIONS=%OPTIONS% --packages %PACKAGES%"
Expand Down
3 changes: 2 additions & 1 deletion sapi/scripts/cygwin/cygwin-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export PATH=/usr/bin:$PATH
export ICU_CXXFLAGS=" -std=gnu++17 "
./buildconf --force
test -f Makefile && make clean

./configure --prefix=/usr --disable-all \
\
--disable-fiber-asm \
Expand Down Expand Up @@ -77,7 +78,7 @@ test -f Makefile && make clean
--enable-exif \
--with-sodium \
--enable-xml --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-dom --with-libxml \
--enable-gd --with-jpeg --with-freetype \
--enable-gd --with-jpeg --with-freetype --with-avif --with-webp \
--enable-swoole --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-cares \
--enable-swoole-pgsql \
--enable-swoole-sqlite \
Expand Down
60 changes: 60 additions & 0 deletions sapi/scripts/msys2/install-libavif.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
__PROJECT__=$(
cd ${__DIR__}/../../../
pwd
)
cd ${__PROJECT__}
mkdir -p pool/lib/
WORK_TEMP_DIR=${__PROJECT__}/var/msys2-build/
mkdir -p ${WORK_TEMP_DIR}

VERSION=1.3.0

download() {
# document https://github.com/AOMediaCodec/libavif/
curl -fSLo ${__PROJECT__}/pool/lib/libavif-v${VERSION}.tar.gz https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${VERSION}.tar.gz
}

build() {

cd ${WORK_TEMP_DIR}
tar xvf ${__PROJECT__}/pool/lib/libavif-v${VERSION}.tar.gz
cd libavif-${VERSION}

mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TOOLS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_DOC=OFF \
-DLIBZIP_DO_INSTALL=ON \
-DENABLE_GNUTLS=OFF \
-DENABLE_MBEDTLS=OFF \
-DENABLE_OPENSSL=ON \
-DENABLE_BZIP2=ON \
-DENABLE_COMMONCRYPTO=OFF \
-DENABLE_LZMA=ON \
-DENABLE_ZSTD=ON \
-DBUILD_REGRESS=OFF \
-DBUILD_OSSFUZZ=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_PREFIX_PATH="/usr/local/;/usr/"


make -j $(nproc)
make install

}

cd ${__PROJECT__}
test -f ${__PROJECT__}/pool/lib/libavif-v${VERSION}.tar.gz || download

build
48 changes: 48 additions & 0 deletions sapi/scripts/msys2/install-libyuv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
__PROJECT__=$(
cd ${__DIR__}/../../../
pwd
)
cd ${__PROJECT__}
mkdir -p pool/lib/
WORK_TEMP_DIR=${__PROJECT__}/var/msys2-build/
mkdir -p ${WORK_TEMP_DIR}

VERSION=068c9f2f643ce59eeb3001d61374bf44a2abd825

download() {
# document https://github.com/AOMediaCodec/libavif/
curl -fSLo ${__PROJECT__}/pool/lib/libyuv-${VERSION}.tar.gz https://chromium.googlesource.com/libyuv/libyuv/+archive/${VERSION}.tar.gz
}

build() {

cd ${WORK_TEMP_DIR}
mkdir -p libyuv-${VERSION}
tar xvf ${__PROJECT__}/pool/lib/libyuv-${VERSION}.tar.gz -C libyuv-${VERSION}
cd libyuv-${VERSION}

mkdir -p build
cd build

cmake -S .. -B . \
-DCMAKE_INSTALL_PREFIX=/usr/ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SIZEOF_VOID_P=8 \
-DCMAKE_VERBOSE_MAKEFILE=ON

make -j $(nproc)
make install

}

cd ${__PROJECT__}
test -f ${__PROJECT__}/pool/lib/libyuv-${VERSION}.tar.gz || download

build
22 changes: 13 additions & 9 deletions sapi/scripts/tencent-cloud-object-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,27 +135,31 @@ set -u
if [ "${UPLOAD_TYPE}" == 'all' ]; then
SWOOLE_VERSION=$(echo ${SWOOLE_CLI_VERSION} | awk -F '.' '{ printf "%s.%s.%s" ,$1,$2,$3 }')
cd ${__PROJECT__}/var/artifact-hash/${SWOOLE_CLI_VERSION}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-cygwin-x64.zip ${COS_BUCKET_FOLDER}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-linux-arm64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz ${COS_BUCKET_FOLDER}
status=$?
{
${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-cygwin-x64.zip ${COS_BUCKET_FOLDER}
${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-linux-arm64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp --forbid-overwrite --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz ${COS_BUCKET_FOLDER}
status=$?
} || {
status=$?
}
if [[ $status -ne 0 ]]; then
echo $status
cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log
cat ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log
exit 1
fi
cd ${__PROJECT__}
exit 0
fi

if [ "${UPLOAD_TYPE}" == 'single' ]; then
${COSCLI} cp ${UPLOAD_FILE} ${COS_BUCKET_FOLDER}
${COSCLI} cp --fail-output-path ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log ${UPLOAD_FILE} ${COS_BUCKET_FOLDER}
status=$?
if [[ $status -ne 0 ]]; then
echo $status
cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log
cat ${__PROJECT__}/var/tencent-cloud-object-storage/upload.log
exit 1
fi
exit 0
Expand Down
4 changes: 1 addition & 3 deletions sapi/scripts/tencent-cloud-object-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ cos:
- name: "${{ vars.QCLOUD_OSS_BUCKET }}"
alias: "${{ vars.QCLOUD_OSS_BUCKET }}"
region: "${{ vars.QCLOUD_OSS_REGION }}"
# endpoint: cos.ap-shanghai.myqcloud.com
# endpoint: wenda-1252906962.cos.accelerate.myqcloud.com
endpoint: "cos.accelerate.myqcloud.com"
endpoint: cos.accelerate.myqcloud.com
ofs: false
4 changes: 4 additions & 0 deletions sapi/src/builder/extension/phpy.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

$tag = 'v1.0.11';


$python3_prefix = PYTHON3_PREFIX;
# $python3_prefix = '/opt/anaconda3';

$options = [];
$options[] = '--enable-phpy';
$options[] = ' --with-python-version=3.12.2';
Expand All @@ -25,6 +28,7 @@

$ext = (new Extension('phpy'))
->withOptions(implode(' ', $options))
//->withOptions('') //不启用编译选项
->withLicense('https://github.com/swoole/phpy/blob/main/LICENSE', Extension::LICENSE_APACHE2)
->withHomePage('https://github.com/swoole/phpy/')
->withManual('https://github.com/swoole/phpy/')
Expand Down
Loading
Loading