File tree Expand file tree Collapse file tree 12 files changed +75
-227
lines changed Expand file tree Collapse file tree 12 files changed +75
-227
lines changed Original file line number Diff line number Diff line change 9393 php prepare.php --show-tarball-hash=1 --with-php-version=8.3.23
9494 php prepare.php --show-tarball-hash=1 --with-php-version=8.4.10
9595
96- echo 'cygwin: https://www.cygwin.com/COPYING' > bin/LICENSE
96+ echo 'cygwin: https://www.cygwin.com/COPYING' >> bin/LICENSE
9797 cd ${{ github.workspace }}/pool/
9898 zip -9 -r ${WORK_DIR}/all-deps.zip ext lib php-tar
9999 HASH=$(sha256sum ${WORK_DIR}/all-deps.zip | awk '{print $1}')
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66
77` php-fpm ` 是一个 FastCGI 进程管理器
88
9-
109> 本项目 派生于 [ swoole-cli] ( https://github.com/swoole/swoole-cli/ )
1110
1211> 代码与 swoole-cli 项目的 build_native_php 分支的代码 保持一致
Original file line number Diff line number Diff line change 22
33## 一个脚本执行整个构建流程
44
5- > 定制 build-release-php.sh 脚本 即可开始构建
5+ > 定制 build-release-php.sh 即可开始构建
66
77``` bash
88
9- cp build-release-example.sh build-release-php.sh
9+ cp build-release-example.sh build-release-php.sh
1010
11- bash build-release-php.sh
11+ bash build-release-php.sh
1212
1313```
1414
@@ -22,6 +22,50 @@ bash build-release-php.sh
2222
2323## [ wsl] ( ../../docs/wsl.md )
2424
25+ ## 准备 PHP 运行时
26+
27+ ``` bash
28+ # 准备 PHP 运行时
29+ bash sapi/setup-php-runtime.sh
30+
31+ # 准备PHP 运行时 使用代理
32+ bash sapi/setup-php-runtime.sh --proxy http://192.168.3.26:8015
33+
34+ # 准备PHP 运行时 使用镜像 (镜像源 https://www.swoole.com/download)
35+ bash sapi/setup-php-runtime.sh --mirror china
36+
37+
38+ # 验证
39+ shopt -s expand_aliases
40+ __DIR__=$( pwd)
41+ export PATH=" ${__DIR__} /runtime/php/:$PATH "
42+ alias php=" php -d curl.cainfo=${__DIR__} /runtime/php/cacert.pem -d openssl.cafile=${__DIR__} /runtime/php/cacert.pem"
43+
44+ php -v
45+ composer -v
46+
47+ ```
48+
49+ ## 准备依赖库源码
50+
51+ ``` bash
52+
53+ # 源码来源 https://github.com/swoole/swoole-cli/releases/download/${TAG}/all-deps.zip
54+
55+ bash sapi/download-box/download-box-get-archive-from-server.sh
56+
57+ ```
58+
59+ ## 准备 swoole 源码
60+
61+ > 拉取 swoole-cli 源码时没有拉取子模块,就需要执行这一步
62+
63+ ``` bash
64+
65+ git submodule update --init -f
66+
67+ ```
68+
2569## 准备运行环境 (linux/macos/windows)
2670
27711 . [ linux 快速启动 容器 构建环环境 ] ( linux/README.md )
Original file line number Diff line number Diff line change 5151pacman -S --needed --noconfirm git curl wget openssl
5252pacman -S --needed --noconfirm zip unzip xz gcc gcc-libs cmake make
5353pacman -S --needed --noconfirm re2c
54- pacman -S --needed --noconfirm openssl-devel libreadline
5554pacman -S --needed --noconfirm lzip
5655pacman -S --needed --noconfirm zip unzip
5756pacman -S --needed --noconfirm zlib-devel
5857pacman -S --needed --noconfirm bison automake autoconf libtool coreutils
58+ pacman -S --needed --noconfirm openssl-devel libreadline-devel libiconv-devel
5959pacman -S --needed --noconfirm libcurl-devel libxml2-devel libxslt-devel
6060pacman -S --needed --noconfirm libbz2-devel liblz4-devel liblzma-devel libcares-devel
61- pacman -S --needed --noconfirm libyaml-devel libzstd-devel libreadline-devel
62- pacman -S --needed --noconfirm libssh2-devel libidn2-devel gettext-devel
6361pacman -S --needed --noconfirm libzstd-devel
64- pacman -S --needed --noconfirm icu-devel
65- pacman -S --needed --noconfirm libsqlite-devel libsqlite
62+ pacman -S --needed --noconfirm libyaml-devel
63+ pacman -S --needed --noconfirm libssh2-devel libidn2-devel gettext-devel
64+ pacman -S --needed --noconfirm libsqlite-devel
6665pacman -S --needed --noconfirm libedit-devel
6766pacman -S --needed --noconfirm gmp-devel
6867pacman -S --needed --noconfirm brotli-devel
Original file line number Diff line number Diff line change 44use SwooleCli \Extension ;
55
66return function (Preprocessor $ p ) {
7- $ file = "swoole-latest.tar.gz " ;
7+ $ swoole_tag = 'master ' ;
8+ $ file = "swoole-v {$ swoole_tag }.tar.gz " ;
89 $ options = [];
910
1011 if ($ p ->getBuildType () === 'debug ' ) {
4243 $ p ->withExportVariable ('URING_LIBS ' , '$(pkg-config --libs --static liburing) ' );
4344 }
4445
45- $ p ->addExtension ((new Extension ('swoole ' ))
46+ $ p ->addExtension ((new Extension ('swoole_latest ' ))
47+ ->withAliasName ('swoole ' )
4648 ->withHomePage ('https://github.com/swoole/swoole-src ' )
4749 ->withLicense ('https://github.com/swoole/swoole-src/blob/master/LICENSE ' , Extension::LICENSE_APACHE2 )
4850 ->withManual ('https://wiki.swoole.com/#/ ' )
4951 ->withFile ($ file )
5052 ->withDownloadScript (
5153 'swoole-src ' ,
5254 <<<EOF
53- git clone -b master --depth=1 https://github.com/swoole/swoole-src.git
55+ git clone -b $ swoole_tag --depth=1 https://github.com/swoole/swoole-src.git
5456EOF
5557 )
5658 ->withAutoUpdateFile ()
Original file line number Diff line number Diff line change 55use SwooleCli \Extension ;
66
77return function (Preprocessor $ p ) {
8-
9- $ file = "swoole-v5.1.x.tar.gz " ;
108 $ swoole_tag = '5.1.x ' ;
9+ $ file = "swoole-v $ {$ swoole_tag }.tar.gz " ;
1110 $ options = [];
1211
1312 if ($ p ->getBuildType () === 'debug ' ) {
Original file line number Diff line number Diff line change 55use SwooleCli \Library ;
66
77return function (Preprocessor $ p ) {
8+ $ swow_tag = 'v1.6.1 ' ;
89 $ options = ' --enable-swow ' ;
910 $ options .= ' --enable-swow-ssl ' ;
1011 $ options .= ' --enable-swow-curl ' ;
2021 ->withHomePage ('https://github.com/swow/swow ' )
2122 ->withLicense ('https://github.com/swow/swow/blob/develop/LICENSE ' , Extension::LICENSE_APACHE2 )
2223 ->withManual ('https://docs.toast.run/swow/en/install.html ' )
23- ->withFile (' swow-v1.5.3. tar.gz ' )
24+ ->withFile (" swow- { $ swow_tag } . tar.gz" )
2425 ->withDownloadScript (
2526 "swow " ,
2627 <<<EOF
27- git clone -b v1.5.3 https://github.com/swow/swow.git
28- mv swow swow-t
29- mv swow-t/ext swow
30- rm -rf swow-t
28+ git clone -b {$ swow_tag } https://github.com/swow/swow.git swow-code
29+ mv swow-code/ext swow
3130EOF
3231 )
3332 ->withBuildCached (false )
Original file line number Diff line number Diff line change 2626 ->withDownloadScript (
2727 "swow " ,
2828 <<<EOF
29- git clone -b develop https://github.com/swow/swow.git
30- mv swow swow-t
31- mv swow-t/ext swow
32- rm -rf swow-t
29+ git clone -b develop https://github.com/swow/swow.git swow-code
30+ mv swow-code/ext swow
3331EOF
3432 )
3533 ->withDependentLibraries (...$ dependentLibraries )
Original file line number Diff line number Diff line change 9797
9898case " $MIRROR " in
9999china)
100- APP_DOWNLOAD_URL=" https://wenda-1252906962.file.myqcloud .com/dist/${APP_NAME} -${APP_VERSION} -${OS} -${ARCH} .tar.xz"
100+ APP_DOWNLOAD_URL=" https://storage.swoole .com/dist/${APP_NAME} -${APP_VERSION} -${OS} -${ARCH} .tar.xz"
101101 COMPOSER_DOWNLOAD_URL=" https://mirrors.tencent.com/composer/composer.phar"
102102 if [ $OS = ' windows' ]; then
103- APP_DOWNLOAD_URL=" https://wenda-1252906962.file.myqcloud .com/dist/${APP_NAME} -${APP_VERSION} -cygwin-${ARCH} .zip"
103+ APP_DOWNLOAD_URL=" https://storage.swoole .com/dist/${APP_NAME} -${APP_VERSION} -cygwin-${ARCH} .zip"
104104 fi
105105 ;;
106106
You can’t perform that action at this time.
0 commit comments