Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
292539f
Upgrade swoole to v6.1.3
matyhtf Nov 26, 2025
fd7471d
Add support for deb package
matyhtf Nov 26, 2025
ddec7c6
Add support for the dynamically linked glibc build
matyhtf Nov 28, 2025
2c1115a
Add support for the dynamically linked glibc build
matyhtf Nov 28, 2025
169a7b0
merge code
jingjingxyk Nov 29, 2025
2b811db
解决linux 容器内 git 添加目录安全配置
jingjingxyk Dec 3, 2025
6680893
保持 bin 目录 var 目录存在
jingjingxyk Dec 3, 2025
bfcf8ce
merge code
jingjingxyk Dec 3, 2025
7d5c626
启用 gd imagemagick
jingjingxyk Dec 3, 2025
157b5fd
启用 msys2 构建环境
jingjingxyk Dec 3, 2025
a693af1
添加忽略文件
jingjingxyk Dec 3, 2025
1914a07
msys2 构建包上传到 OSS
jingjingxyk Dec 3, 2025
7dafafa
msys2 install nasm yasm
jingjingxyk Dec 3, 2025
6dcfd3b
merge code
jingjingxyk Dec 3, 2025
b339860
Fix linux container exception (#1054)
jingjingxyk Dec 4, 2025
0c6cabc
msys2 构建环境 启用 gd imagemagick (#1055)
jingjingxyk Dec 4, 2025
f0efec2
Added avif supports
matyhtf Dec 4, 2025
9544417
Added avif supports
matyhtf Dec 4, 2025
e2d9619
Add ext-phpy
matyhtf Dec 4, 2025
6d8fa71
Merge branch 'main' into 6.1
matyhtf Dec 9, 2025
e05b668
Update swoole version
matyhtf Dec 9, 2025
85cdab8
解决msys2 缓存包已存在报错信息
jingjingxyk Dec 15, 2025
e7fec82
merge msys2 feature
jingjingxyk Dec 17, 2025
b21c622
解决msys2 缓存包已存在报错信息 (#1056)
jingjingxyk Dec 22, 2025
b7f696e
升级 swoole 版本为v6.1.5
jingjingxyk Dec 22, 2025
e61e07d
Merge branch 'main' into update-swoole-version
jingjingxyk Dec 22, 2025
f67ba72
兼容macos-12
jingjingxyk Dec 26, 2025
7a58eab
Merge branch 'compatible-macos-12' into experiment-feature
jingjingxyk Dec 27, 2025
afa5540
update swoole version to v6.1.6
jingjingxyk Dec 29, 2025
259f239
Merge branch 'update-swoole-version' into experiment-feature
jingjingxyk Jan 9, 2026
84dcfe9
使用PIE 下载扩展
jingjingxyk Jan 9, 2026
37472f4
fix merge code conflict
jingjingxyk Jan 11, 2026
2600d6c
fix code bug
jingjingxyk Jan 11, 2026
c76cf4f
优化 preprocessor.php
jingjingxyk Jan 12, 2026
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
4 changes: 3 additions & 1 deletion .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
mkdir -p bin/
mkdir -p runtime/
test -f runtime/php && rm -f runtime/php
if [ ! -f runtime/php/php ] ; then
if [ ! -f runtime/php/pie ] ; then
bash setup-php-runtime.sh
fi
bash sapi/download-box/download-box-get-archive-from-server.sh
Expand All @@ -114,6 +114,8 @@ jobs:
alias php="php -d curl.cainfo=/work/runtime/php/cacert.pem -d openssl.cafile=/work/runtime/php/cacert.pem"

sh sapi/quickstart/linux/alpine-init.sh
git config --global --add safe.directory /work

composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev

Expand Down
150 changes: 150 additions & 0 deletions .github/workflows/linux-glibc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: build-swoole-cli-linux-glibc-x86_64

on: [ push, pull_request ]

jobs:
linux-glibc:
if: ${{ !contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[linux-glibc]') }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, ubuntu-22.04-arm ]
name: linux-glibc-${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Show Environment Info
run: |
echo $PATH
env
docker info
id -u
id -g
who
cat /etc/os-release
hostnamectl
uname -s
uname -m
uname -r

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
cat /proc/cpuinfo | grep "cpu cores" | uniq
cat /proc/cpuinfo| grep "processor"| wc -l
lscpu

export IPV6=$(ip -6 address show | grep inet6 | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
export IPV4=$(ip -4 address show | grep inet | grep -v 127.0.0 | awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')
echo $IPV4
echo $IPV6
echo "X_IPV6=${IPV6}" >> $GITHUB_ENV
echo "X_IPV4=${IPV4}" >> $GITHUB_ENV

- name: Prepare Build Environment
run: |
git submodule update --init

sudo mkdir -p /usr/local/swoole-cli
uid=$(id -u) && gid=$(id -g) && sudo chown -R ${uid}:${gid} /usr/local/swoole-cli

mkdir -p ${{ github.workspace }}/var/build-github-action-container/

- name: Cache PHP Runtime
uses: actions/cache@v4
id: php-runtime-cache-x86_64
with:
path: ${{ github.workspace }}/runtime
key: ${{ runner.os }}-x86_64-php-runtime

- name: Cache PHP Vendor
uses: actions/cache@v4
id: php-vendor-cache-x86_64
with:
path: ${{ github.workspace }}/vendor
key: ${{ runner.os }}-x86_64-php-vendor

- name: Cache Dependency Source Code Tarball
uses: actions/cache@v4
id: pool-cache
with:
path: ${{ github.workspace }}/pool/
key: source-code-tarball-pool

- name: Cache all-library
uses: actions/cache@v4
id: all-library-cache-x86_64
with:
path: /usr/local/swoole-cli
key: ${{ github.head_ref || github.ref_name }}-${{ runner.os }}-x86_64-all-library

- name: Prepare Runtime and Libraries and Extensions
run: |
set -x
mkdir -p pool/lib
mkdir -p pool/ext
mkdir -p bin/
mkdir -p runtime/
test -f runtime/php && rm -f runtime/php
if [ ! -f runtime/php/pie ] ; then
bash setup-php-runtime.sh
fi
bash sapi/download-box/download-box-get-archive-from-server.sh
ls -A pool/lib/
ls -A /usr/local/swoole-cli/

- name: Build
run: |
set -eux
uname -m
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile

php prepare.php --with-libavif --without-docker

sudo apt update
bash ./sapi/scripts/install-deps-on-ubuntu.sh
bash ./ext/swoole/scripts/install-deps-on-ubuntu.sh
bash ./sapi/scripts/build-swoole-cli-with-linux-gcc.sh

./bin/swoole-cli -v
./bin/swoole-cli -m
./bin/swoole-cli --ri curl
./bin/swoole-cli --ri gd
./bin/swoole-cli --ri imagick
./bin/swoole-cli --ri swoole
{ ldd ./bin/swoole-cli ; } || { echo $? ; } ;
file ./bin/swoole-cli

- name: Make nfpm package
run: |
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
NFPM_ARCH="arm64"
else
NFPM_ARCH="amd64"
fi
wget https://github.com/goreleaser/nfpm/releases/download/v2.43.4/nfpm_2.43.4_${NFPM_ARCH}.deb
sudo dpkg -i nfpm_2.43.4_${NFPM_ARCH}.deb
strip ./bin/swoole-cli
./make.sh nfpm-pkg
ls -ls ./*.deb
ls -ls ./*.rpm

- name: upload artifacts to cloud object storage
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
env:
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
run: |
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
FILE_ARCH="arm64"
else
FILE_ARCH="x64"
fi
SWOOLE_VERSION=$(awk 'NR==1{ print $1 }' "sapi/SWOOLE-VERSION.conf")
OS="linux"
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-"${SWOOLE_VERSION}-${OS}-${FILE_ARCH}"-glibc.deb
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-"${SWOOLE_VERSION}-${OS}-${FILE_ARCH}"-glibc.rpm
4 changes: 3 additions & 1 deletion .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
mkdir -p bin/
mkdir -p runtime/
test -f runtime/php && rm -f runtime/php
if [ ! -f runtime/php/php ] ; then
if [ ! -f runtime/php/pie ] ; then
bash setup-php-runtime.sh
fi

Expand All @@ -139,6 +139,8 @@ jobs:
alias php="php -d curl.cainfo=/work/runtime/php/cacert.pem -d openssl.cafile=/work/runtime/php/cacert.pem"

sh sapi/quickstart/linux/alpine-init.sh
git config --global --add safe.directory /work

composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
mkdir -p bin/
mkdir -p runtime/
test -f runtime/php && rm -f runtime/php
if [ ! -f runtime/php/php ] ; then
if [ ! -f runtime/php/pie ] ; then
bash setup-php-runtime.sh
fi
bash sapi/download-box/download-box-get-archive-from-server.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
mkdir -p bin/
mkdir -p runtime/
test -f runtime/php && rm -f runtime/php
if [ ! -f runtime/php/php ] ; then
if [ ! -f runtime/php/pie ] ; then
bash setup-php-runtime.sh
fi
bash sapi/download-box/download-box-get-archive-from-server.sh
Expand Down
37 changes: 26 additions & 11 deletions .github/workflows/windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
windows-msys2:
if: 0
if: 1
runs-on: windows-2022
steps:
- name: Show Environment Info
Expand All @@ -31,15 +31,6 @@ jobs:
git config --global --add safe.directory ${{ github.workspace }}

- uses: actions/checkout@v4
- name: Cache msys2 packages
id: cache-msys2
uses: actions/cache@v4
env:
cache-name: cache-msys2-packages
with:
path: C:\msys2-packages
key: "${{ runner.os }}-build-${{ env.cache-name }}"

- name: Cache pool
id: cache-msys2-pool
uses: actions/cache@v4
Expand All @@ -56,7 +47,8 @@ jobs:
- name: prepare build environment
shell: msys2 {0}
run: |
bash ./sapi/quickstart/windows/msys2-build/install-msys2.sh
bash sapi/quickstart/windows/msys2-build/install-msys2.sh
bash sapi/download-box/download-box-get-archive-from-server.sh

- name: install deps lib with source code
shell: msys2 {0}
Expand Down Expand Up @@ -117,3 +109,26 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}-msys2-x64.zip


upload-to-cloud-object-storage:
if: 1
runs-on: ubuntu-latest
needs: windows-msys2
steps:
- name: Prepare Run Environment
run:
sudo apt install -y curl
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: upload artifacts to cloud object storage
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
env:
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
run: |
FILE_NAME=$(ls -d swoole-cli-v*-msys2-x64)
FILE="${{ github.workspace }}/${FILE_NAME}/${FILE_NAME}.zip"
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${FILE}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ tmp-php.ini
/ext/ds
/ext/xlswriter
/ext/uuid
/ext/phpy
/.phpunit.result.cache
/samples/sfx/*.phar
.php-cs-fixer.cache
Expand All @@ -334,8 +335,6 @@ php.ini
sapi/webUI/deploy.sh
sapi/webUI/public/data/
Makefile.backup
ldflags.log
cppflags.log
libs.log
ext/apcu/
ext/ssh2/
Expand All @@ -348,3 +347,7 @@ php-fpm-*
!/runtime/.gitkeep
/APP_NAME
/APP_VERSION
*.deb
*.rpm
nfpm-pkg.yaml
!/var/.gitkeep
Empty file added bin/.gitkeep
Empty file.
18 changes: 14 additions & 4 deletions prepare.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,23 @@
// Sync code from php-src
$p->setPhpSrcDir($p->getWorkDir() . '/var/php-' . BUILD_PHP_VERSION);

/*
// Download swoole-src
if (!is_dir(__DIR__ . '/ext/swoole')) {
//shell_exec(__DIR__ . '/sapi/scripts/download-swoole-src-archive.sh');
}
*/

// Compile directly on the host machine, not in the docker container
if ($p->getInputOption('without-docker') || ($p->isMacos())) {
if ($p->getInputOption('without-docker') || ($p->isMacos()) || ($p->isLinux() && (!is_file('/.dockerenv')))) {
$p->setWorkDir(__DIR__);
$p->setBuildDir(__DIR__ . '/thirdparty');
}


if ($p->getInputOption('with-override-default-enabled-ext')) {
$p->setExtEnabled([]);
}


if ($p->getInputOption('with-global-prefix')) {
$p->setGlobalPrefix($p->getInputOption('with-global-prefix'));
}
Expand Down Expand Up @@ -93,7 +98,12 @@
if ($p->isMacos()) {
//$p->setExtraLdflags('-undefined dynamic_lookup');
$p->setExtraLdflags('');
$homebrew_prefix = trim(shell_exec('brew --prefix'));
exec("brew --prefix 2>&1", $output, $result_code);
if ($result_code == 0) {
$homebrew_prefix = trim(implode(' ', $output));
} else {
$homebrew_prefix = "";
}
$p->withBinPath($homebrew_prefix . '/opt/flex/bin')
->withBinPath($homebrew_prefix . '/opt/bison/bin')
->withBinPath($homebrew_prefix . '/opt/libtool/bin')
Expand Down
2 changes: 1 addition & 1 deletion sapi/SWOOLE-VERSION.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.1.1
v6.1.6
1 change: 1 addition & 0 deletions sapi/quickstart/windows/msys2-build/install-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pacman -S --needed --noconfirm icu-devel
pacman -S --needed --noconfirm gettext-devel
pacman -S --needed --noconfirm libintl
pacman -S --needed --noconfirm flex
pacman -S --needed --noconfirm nasm yasm

: <<'COMMENT'
# 不存在的包
Expand Down
19 changes: 14 additions & 5 deletions sapi/scripts/build-swoole-cli-with-linux-gcc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
./configure --prefix=/usr --disable-all \
if [ ! -f ./configure ]; then
./buildconf --force
fi

./configure --prefix=/usr/local/swoole-cli \
--disable-all \
--enable-zts \
--without-pcre-jit \
--with-openssl --enable-openssl \
Expand Down Expand Up @@ -30,18 +35,22 @@
--enable-exif \
--with-sodium \
--enable-xml --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-dom --with-libxml \
--enable-gd --with-jpeg --with-freetype \
--enable-swoole --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-cares \
--enable-gd --with-jpeg --with-freetype --with-avif \
--enable-swoole \
--enable-swoole-curl \
--enable-cares \
--enable-swoole-pgsql \
--enable-swoole-sqlite \
--with-swoole-odbc=unixODBC,/usr \
--enable-swoole-thread \
--enable-swoole-stdext \
--enable-brotli \
--enable-zstd \
--enable-swoole-stdext \
--enable-redis \
--with-imagick \
--with-yaml \
--with-readline \
--enable-phpy --with-python-config=python3-config \
--enable-opcache

make -j "$(nproc)"
make -j "$(nproc)"
Loading
Loading