Skip to content

Commit 38c9cc5

Browse files
authored
Merge pull request #992 from jingjingxyk/build_native_php
Build native php
2 parents d9b975b + 0714a6e commit 38c9cc5

21 files changed

+89
-65
lines changed

.github/workflows/auto-cache-pool-tarball.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
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
9697
cd ${{ github.workspace }}/pool/
9798
zip -9 -r ${WORK_DIR}/all-deps.zip ext lib php-tar
9899
HASH=$(sha256sum ${WORK_DIR}/all-deps.zip | awk '{print $1}')
@@ -105,6 +106,7 @@ jobs:
105106
ls -A pool/lib/
106107
ls -A pool/ext/
107108
ls -A pool/php-tar/
109+
cat bin/LICENSE
108110
109111
- name: production artifacts
110112
uses: actions/upload-artifact@v4
@@ -114,6 +116,7 @@ jobs:
114116
path: |
115117
all-deps.zip
116118
all-deps.zip.sha256sum
119+
bin/LICENSE
117120
118121
- name: gh release
119122
uses: softprops/action-gh-release@v2
@@ -122,3 +125,4 @@ jobs:
122125
files: |
123126
all-deps.zip
124127
all-deps.zip.sha256sum
128+
bin/LICENSE

.github/workflows/linux-aarch64.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ jobs:
124124
export PATH=/work/runtime/php/:$PATH # 容器已经内置 php 和 composer
125125
alias php="php -d curl.cainfo=/work/runtime/php/cacert.pem -d openssl.cafile=/work/runtime/php/cacert.pem"
126126
127-
# sed -i 's/mirrors.tuna.tsinghua.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositories
128-
# sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositories
129-
# bash sapi/quickstart/mark-install-library-cached.sh
130-
131127
sh sapi/quickstart/linux/alpine-init.sh
132128
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
133129
composer dump-autoload --optimize --profile --no-dev

.github/workflows/linux-x86_64.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ jobs:
177177
export PATH=/work/runtime/php:$PATH # 容器已经内置 php 和 composer
178178
alias php="php -d curl.cainfo=/work/runtime/php/cacert.pem -d openssl.cafile=/work/runtime/php/cacert.pem"
179179
180-
# bash sapi/quickstart/mark-install-library-cached.sh
181-
182180
sh sapi/quickstart/linux/alpine-init.sh
183181
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
184182
composer dump-autoload --optimize --profile --no-dev

.github/workflows/windows-msys2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-swoole-cli-windows-msys2
1+
name: build-php-cli-windows-msys2
22

33
on:
44
push:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
`php-cli` 是一个 `PHP`的 运行时 ,默认包含 swoole 扩展
88

9+
910
> 本项目 派生于 [swoole-cli](https://github.com/swoole/swoole-cli/)
1011
12+
1113
> 代码与 swoole-cli 项目的 build_native_php 分支的代码 保持一致
1214
1315
> 构建流程 与 swoole-cli 构建流程一致

docs/upgrade.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ php sync-source-code.php --action run
2121

2222
## 目录说明
2323

24-
pool :持久化目录,存放扩展、 PHP 、依赖库等文件,此目录下的文件不会被主动删除
25-
var :运行时目录,临时存在一些文件,在完成配置或构建后将被主动清空删除
24+
- `pool`: 持久化目录,存放扩展、 `PHP` 、依赖库等文件,此目录下的文件不会被主动删除
25+
- `var`: 运行时目录,临时存在一些文件,在完成配置或构建后将被主动清空删除
26+

sapi/docker/build-export-container.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ while [ $# -gt 0 ]; do
4949
shift $(($# > 0 ? 1 : 0))
5050
done
5151

52-
case "$MIRROR" in
53-
china | openatom)
54-
CONTAINER_BASE_IMAGE="docker.io/library/alpine:3.18"
55-
;;
56-
esac
57-
5852
mkdir -p var/build-export-container/
5953
cd ${__PROJECT__}/var/build-export-container/
6054

sapi/quickstart/linux/run-alpine-container.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,5 @@ cd ${__DIR__}
2121

2222
IMAGE=alpine:3.18
2323

24-
MIRROR=''
25-
while [ $# -gt 0 ]; do
26-
case "$1" in
27-
--mirror)
28-
MIRROR="$2"
29-
case "$MIRROR" in
30-
china | openatom)
31-
IMAGE="docker.io/library/alpine:3.18"
32-
;;
33-
esac
34-
;;
35-
esac
36-
shift $(($# > 0 ? 1 : 0))
37-
done
38-
3924
cd ${__DIR__}
4025
docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null

sapi/quickstart/linux/run-debian-container.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,5 @@ cd ${__DIR__}
2121

2222
IMAGE=debian:12
2323

24-
MIRROR=''
25-
while [ $# -gt 0 ]; do
26-
case "$1" in
27-
--mirror)
28-
MIRROR="$2"
29-
case "$MIRROR" in
30-
china | openatom)
31-
IMAGE="docker.io/library/debian:12"
32-
;;
33-
esac
34-
;;
35-
esac
36-
shift $(($# > 0 ? 1 : 0))
37-
done
38-
3924
cd ${__DIR__}
4025
docker run --rm --name swoole-cli-debian-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null

sapi/quickstart/windows/cygwin-build/install-cygwin.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ set "PACKAGES=%PACKAGES%,cmake,openssl,binutils"
4141
set "PACKAGES=%PACKAGES%,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel"
4242
set "PACKAGES=%PACKAGES%,libssh2-devel,libidn2-devel"
4343
set "PACKAGES=%PACKAGES%,libgmp-devel,libsqlite3-devel,libpcre-devel,libpcre2-devel"
44+
set "PACKAGES=%PACKAGES%,libiconv-devel"
4445
set "PACKAGES=%PACKAGES%,libMagick-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel"
4546
set "PACKAGES=%PACKAGES%,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel"
4647
set "PACKAGES=%PACKAGES%,libzstd-devel,libbrotli-devel"

0 commit comments

Comments
 (0)