Skip to content

Commit b6b4826

Browse files
jingjingxykmatyhtf
andauthored
Feature v5.1.x 拉取 main 分支代码 (#924)
* 完善 upgrade php version to 8.1.29 (#752) * update * sync php code * update extension swoole code * update setup-php-runtime.sh (#751) * disable swoolg pg test (#755) * disable swoolg pg test * Update linux-x86_64.yml --------- Co-authored-by: Tianfeng.Han <[email protected]> * v6 cygwin 环境禁用 opcache (#760) * 默认下载的 swoole-cli 版本由 v5.13.0 升级为 v5.1.4.0 (#759) * 升级下载 swoole-cli 默认版本为 v5.1.4.0 * update * Feature test swoole pg (#758) * test v6 swoole pdo_pgsql * test * test * update swoole PGSQL Test * Optimize code * Optimize cygwin scripts * fix * Update ext-swoole * add liburing io_uring library (#700) * 更新 quickstart 脚本 (#766) * 更新 quickstart 脚本 * update quickstart script * update quickstart script * 调整 github aciton macos workflow (#764) * 调整 github aciton macos workflow * optimize code * 更新 下载源码包(all-deps.zip) 集合 hash 签名 (#768) * 更新 下载源码包 集合 hash 签名 * update * update sync-source-code.php (#763) * 调整 uuid 扩展 依赖库 命名 (#771) * Optimize gettext * Optimize code. default enable gettext, intl, uuid * Upgrade mongodb to 1.19.4, Fix macOS * Remove gettext, intl, uuid extensions because they cannot be supported on macOS. Optimize directory name. * update extensions.md (#780) * 删除 multistage-build-dependencies-container , 此功能由 build-export-container.sh 脚本代替 (#778) * optimzie * 移除提前构建依赖容器脚本, 此功能由 build-export-container.sh 脚本代替 * fix uuid gettext config error (#776) * update setup php swoole-cli runtime (#784) * update workflow (#772) * dockerfile 和 dockerfile-arm64 合并为一个 (#777) * 使用 tini 正确地回收其子进程 * format bash script * 合并dockerfile dockerfile-arm64 * 自动指定构建容器的架构 * 构建容器指定架构 * 添加 开放原子 容器镜像 解决拉取基础镜像超时 (#767) * 添加 开放原子 容器镜像 解决拉取基础镜像超时 * update * fix script error * update make.sphp * 1. 修复 libxml2, libxslt URL 2. 删除 docker build --progress=plain 参数,非通用参数,部分 docker 版本不支持 3. 修复 PHP 8.4 支持 4. 为 make.sh 添加可执行属性 * Fix mongodb extension build error (#788) * update mongodb extension config * update mongodb extension config * update mongodb extension config * update mongodb extension config * update mongodb extension config * update mongodb extension config * fix readline not work (#802) * Feature optimize code for macOS builder (#792) * optimize code * macos x86_64 with macOS 13 * update macos workflow config * update macos-init.sh * update macos-init.sh * update macos-init.sh * 更新 swoole 至最新 * 修复 macos 编译出错的问题 --filter=[macos-aarch64][macos-x86_64] * 设置 加载 php.ini 默认目录 (#812) * update prepare.php (#813) * Fix sync source code (#798) * fix bug sync-source-code.php * fix bug sync-source-code.php * fix sync-source-code * update sync-source-code.php * fix readline not work * update sync-source-code.php * update sync-source-code.php * update sync-source-code.php * update sync-source-code.php for fpm * update prepare.php * update sync-source-code.php for fpm * update swoole souce code (#833) * update setup-swoole-cli-runtime.sh (#834) * 更新 下载所有依赖包的hash 值 和 升级默认下载的swoole-cli 版本 (#821) * 更新 下载 所有依赖包 hash 值 * update to latest swoole * update to latest swoole version * gd 扩展支持 avif 格式图片 (#815) * gd 扩展支持 avif 格式图片 * gd 扩展支持 avif 格式图片 * update libaom build config * tar-default * update libgav1 build config * update * update libyuv * update svt-av1 build config * update gd extenison config * update library for libavif * update gd config option * update libyuv build config * checkout file composer.lock * workflow show gd extension info * update swoole version * update libyuv download url * update library.php * update to latest swoole version * update test GD extension * update libyuv build config * gd 支持 avif 图片 * gd 支持 avif 图片 * 默认启用xslwriter 扩展 (#838) * format download-box script (#837) * 下载 swoole-cli 运行时 可指定版本 (#842) * 指定下载 swoole-cli 版本 * 指定下载 swoole-cli 版本 * extensions.md add xslwriter (#840) * extensions.md add xslwriter * extensions.md add xslwriter * fix enable xlswriter (#846) * fix download swoole-cli runtime bug (#852) * swoole support zstd (#856) * swoole support zstd * update swoole source code * swoole add depend libzstd * add ZSTD_CFLAGS ZSTD_LIBS * 生成 artifacts hash (#857) * generate artifacts sha256sum * 生成指定版本的 hash * 生成指定版本的 hash * 生成指定版本的 hash * 生成 发版 hash * fix 生成 发版 hash * update generate artifact hash script * update artifact-hash.yaml * optimize generate artifact hash * optimize generate artifact * fix bug (#870) * upgrade swoole version to v6.0.0 (#869) * 使用 curl下载出现错误时,打印错误信息 (#887) * update download-box version (#888) * update install cygwin build environment (#889) * update install cygwin build environment * update windows-cygwin.yml * add runner-images.md * runner-images.md * 为 make.sh 脚本添加 bash 执行引导 * 修复拼写错误和 php warning * 优化 cygwin 构建环境 (#893) * 优化 cygwin 构建环境 * 优化 cygwin 构建环境 * updae install-cygwin.bat * test cygwin make * update cygwin-build.sh * update cygwin-build.sh * update cygwin-build.sh * quickstart linux 运行容器名称与默认保持一致 (#890) * 发版时自动上传到腾讯云对象存储 (#874) * 发版时自动上传到腾讯云对象存储 * optimize workflow upload file to cloud object storage * update * optimize upload cloud object storage * optimize upload to cloud object storage * optimize workflow if condition * update cygwin workflow config * update cygwin workflow config * download all-deps.zip version * update dowonload-cygwin.bat * merge main source code * merge main source code * 更新 获取 github respository 仓库变量 * 更新 获取 github respository 仓库变量 * Feature quickstart fix error and format script code (#897) * update quickstart linux connection container config * format code * update install-docker.sh * update make.php * 细节优化 * fix cygwin git error (#899) * Fix quickstart connection swoole-cli-builder bug (#902) * fix quickstart connection continer bug * fix quickstart connection swoole-cli-buider bug * optimize * quickstart run-swoole-cli-builder.sh 优化 (#903) * fix run-swoole-cli-buider-bug * quickstart run-swoole-cli-builder.sh 优化 * AtomHub 已下线,移除开放原子容器镜像 (#914) * 添加生成 docker.io/phpswoole/swoole-cli 容器 脚本 (#913) * 添加生成 docker.io/phpswoole/swoole-cli 容器 * build-swoole-cli-alpine-container.sh * build-swoole-cli-alpine-container.sh * update * 改进 测试数据库 启动配置 (#916) * 该进 测试数据库 启动配置 * update install-docker-compose.sh * update database docker-compose.yaml * 优化 同步 php 源码 (#909) * 优化 同步 php 源码 * update upgrade.md * update download-php-src-archive.php * update upgrade.md * udate download-php-src-archive.php * update download-php-src-archive.php * swoole upgrade v6.0.1 (#921) * 启用github action linux aarch64 原生构建 (#922) * 启用github action linux aarch64 原生构建 * merge code * merge code * 更新 github action linux workflow 生成容器镜像 OS 类型 * 更新 github action workflow 配置 * 指定swoole 版本 为 v5.1.7 * fix merge code error * fix merge code error * fix merge code error --------- Co-authored-by: Tianfeng.Han <[email protected]>
1 parent 91953f4 commit b6b4826

26 files changed

+465
-4526
lines changed

.github/workflows/build-alpine-builder-container.sh

+25-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -exu
44
__DIR__=$(
@@ -16,7 +16,7 @@ cd ${__PROJECT__}/var/build-github-action-container/
1616

1717
cp -f ${__PROJECT__}/sapi/quickstart/linux/alpine-init.sh .
1818

19-
cat > Dockerfile <<'EOF'
19+
cat >Dockerfile <<'EOF'
2020
FROM alpine:3.18
2121
2222
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@@ -25,7 +25,6 @@ ENV TZ=Etc/UTC
2525
ADD ./alpine-init.sh /alpine-init.sh
2626
2727
RUN sh /alpine-init.sh
28-
# RUN sh /alpine-init.sh --mirror china
2928
3029
RUN uname -m
3130
RUN mkdir /work
@@ -35,9 +34,25 @@ ENTRYPOINT ["tini", "--"]
3534
3635
EOF
3736

38-
39-
40-
PLATFORM='linux/amd64'
37+
PLATFORM=''
38+
ARCH=$(uname -m)
39+
case $ARCH in
40+
'x86_64')
41+
PLATFORM='linux/amd64'
42+
;;
43+
'aarch64')
44+
PLATFORM='linux/arm64'
45+
;;
46+
'riscv64')
47+
PLATFORM="linux/riscv64"
48+
;;
49+
'mips64le')
50+
PLATFORM="linux/mips64le"
51+
;;
52+
'loongarch64')
53+
PLATFORM="linux/mips64le"
54+
;;
55+
esac
4156

4257
while [ $# -gt 0 ]; do
4358
case "$1" in
@@ -51,18 +66,14 @@ while [ $# -gt 0 ]; do
5166
shift $(($# > 0 ? 1 : 0))
5267
done
5368

54-
55-
5669
IMAGE='swoole-cli-builder:latest'
57-
docker buildx build -t ${IMAGE} -f ./Dockerfile . --platform ${PLATFORM}
70+
docker buildx build -t ${IMAGE} -f ./Dockerfile . --platform ${PLATFORM}
5871

5972
docker save -o "swoole-cli-builder-image.tar" ${IMAGE}
6073

61-
62-
6374
# alpine 可设置的架构选项
6475
# https://hub.docker.com/_/alpine/tags
65-
:<<'EOF'
76+
: <<'EOF'
6677
linux/386
6778
linux/amd64
6879
linux/arm/v6
@@ -72,3 +83,5 @@ linux/ppc64le
7283
linux/s390x
7384
EOF
7485

86+
# 龙芯架构
87+
# https://cr.loongnix.cn/search
+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: build-swoole-cli-linux-aarch64-qemu
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
linux-aarch64-qemu:
7+
if: 0
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Show Environment Info
12+
run: |
13+
lscpu
14+
echo $PATH
15+
env
16+
docker info
17+
id -u
18+
id -g
19+
who
20+
cat /etc/os-release
21+
hostnamectl
22+
uname -s
23+
uname -m
24+
uname -r
25+
export IPV6=$(ip -6 address show | grep inet6 | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
26+
export IPV4=$(ip -4 address show | grep inet | grep -v 127.0.0 | awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')
27+
echo $IPV4
28+
echo $IPV6
29+
echo "X_IPV6=${IPV6}" >> $GITHUB_ENV
30+
echo "X_IPV4=${IPV4}" >> $GITHUB_ENV
31+
32+
- name: Prepare Build Environment
33+
run: |
34+
git submodule update --init
35+
36+
sudo mkdir -p /usr/local/swoole-cli
37+
uid=$(id -u) && gid=$(id -g) && sudo chown -R ${uid}:${gid} /usr/local/swoole-cli
38+
39+
mkdir -p ${{ github.workspace }}/var/build-github-action-container/
40+
41+
- name: Prepare QEMU
42+
run: |
43+
set -x
44+
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
45+
46+
- name: Prepare swoole-cli-builder-image
47+
run: |
48+
if [ -f ${{ github.workspace }}/var/build-github-action-container/swoole-cli-builder-image.tar ] ; then
49+
docker load -i ${{ github.workspace }}/var/build-github-action-container/swoole-cli-builder-image.tar
50+
else
51+
bash .github/workflows/build-alpine-builder-container.sh --platform "linux/arm64"
52+
fi
53+
54+
- name: prepare pre-built library
55+
uses: addnab/docker-run-action@v3
56+
with:
57+
image: docker.io/jingjingxyk/build-swoole-cli:all-dependencies-alpine-3.18-php8-v1.0.0-aarch64-20240618T091126Z
58+
options: -v ${{ github.workspace }}:/work -w /work -v /usr/local/swoole-cli/:/usr/local/tmp/
59+
run: |
60+
for i in `ls /usr/local/swoole-cli/`
61+
do
62+
if [ ! -d /usr/local/tmp/${i} ] ; then
63+
echo $i
64+
cp -rf /usr/local/swoole-cli/${i}/ /usr/local/tmp/${i}
65+
fi
66+
done
67+
68+
- name: Build
69+
uses: addnab/docker-run-action@v3
70+
with:
71+
image: swoole-cli-builder:latest
72+
options: -v ${{ github.workspace }}:/work -w /work -v /usr/local/swoole-cli:/usr/local/swoole-cli
73+
run: |
74+
set -eux
75+
uname -m
76+
if [ ! -f bin/runtime/php ] ; then
77+
bash setup-php-runtime.sh
78+
fi
79+
80+
export PATH=/work/bin/runtime:$PATH # 容器已经内置 php 和 composer
81+
alias php="php -d curl.cainfo=/work/bin/runtime/cacert.pem -d openssl.cafile=/work/bin/runtime/cacert.pem"
82+
83+
sh sapi/quickstart/linux/alpine-init.sh
84+
composer install --no-interaction --no-autoloader --no-scripts --profile
85+
composer dump-autoload --optimize --profile
86+
87+
php prepare.php
88+
89+
bash make.sh all-library
90+
91+
bash make.sh config
92+
bash make.sh build
93+
bash make.sh archive
94+
95+
- name: Show Build Result
96+
uses: addnab/docker-run-action@v3
97+
with:
98+
image: swoole-cli-builder:latest
99+
options: -v ${{ github.workspace }}:/work -w /work
100+
run: |
101+
./bin/swoole-cli -v
102+
./bin/swoole-cli -m
103+
./bin/swoole-cli --ri gd
104+
./bin/swoole-cli --ri swoole
105+
file ./bin/swoole-cli
106+
readelf -h ./bin/swoole-cli
107+
APP_VERSION=$(./bin/swoole-cli -v | awk '{print $2}')
108+
echo ${APP_VERSION}
109+
echo ${APP_VERSION} > APP_VERSION
110+
111+
./bin/swoole-cli -r "echo PHP_VERSION;"
112+
113+
./bin/swoole-cli ./vendor/bin/phpunit ./sapi/src/UnitTest/MainTest.php --list-tests
114+
./bin/swoole-cli ./vendor/bin/phpunit ./sapi/src/UnitTest/MainTest.php

.github/workflows/linux-aarch64.yml

+39-66
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ on: [ push, pull_request ]
44

55
jobs:
66
linux-aarch64:
7-
if: 1
8-
runs-on: ubuntu-latest
7+
if: ${{ !contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[linux-aarch64]') }}
8+
runs-on: ubuntu-24.04-arm
99
steps:
1010
- uses: actions/checkout@v4
1111
- name: Show Environment Info
1212
run: |
13-
lscpu
1413
echo $PATH
1514
env
1615
docker info
@@ -22,6 +21,13 @@ jobs:
2221
uname -s
2322
uname -m
2423
uname -r
24+
25+
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
26+
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
27+
cat /proc/cpuinfo | grep "cpu cores" | uniq
28+
cat /proc/cpuinfo| grep "processor"| wc -l
29+
lscpu
30+
2531
export IPV6=$(ip -6 address show | grep inet6 | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
2632
export IPV4=$(ip -4 address show | grep inet | grep -v 127.0.0 | awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')
2733
echo $IPV4
@@ -40,14 +46,14 @@ jobs:
4046
4147
- name: Cache PHP Runtime
4248
uses: actions/cache@v4
43-
id: php-runtime-cache
49+
id: php-runtime-cache-aarch64
4450
with:
4551
path: ${{ github.workspace }}/bin/runtime
4652
key: ${{ runner.os }}-aarch64-php-runtime
4753

4854
- name: Cache PHP Vendor
4955
uses: actions/cache@v4
50-
id: php-vendor-cache
56+
id: php-vendor-cache-aarch64
5157
with:
5258
path: ${{ github.workspace }}/vendor
5359
key: ${{ runner.os }}-aarch64-php-vendor
@@ -61,33 +67,18 @@ jobs:
6167

6268
- name: Cache all-library
6369
uses: actions/cache@v4
64-
id: all-library-cache
70+
id: all-library-cache-aarch64
6571
with:
6672
path: /usr/local/swoole-cli
6773
key: ${{ github.head_ref || github.ref_name }}-${{ runner.os }}-aarch64-all-library
6874

6975
- name: Cache swoole-cli-builder-image
7076
uses: actions/cache@v4
71-
id: swoole-cli-builder-image-aarch64-cache
77+
id: swoole-cli-builder-image-cache-aarch64
7278
with:
7379
path: ${{ github.workspace }}/var/build-github-action-container/swoole-cli-builder-image.tar
7480
key: ${{ runner.os }}-aarch64-swoole-cli-builder-image
7581

76-
- name: Prepare Libraries and Extensions
77-
run: |
78-
set -x
79-
mkdir -p pool/lib
80-
mkdir -p pool/ext
81-
mkdir -p bin/runtime
82-
bash sapi/download-box/download-box-get-archive-from-server.sh
83-
ls -A pool/lib/
84-
ls -A /usr/local/swoole-cli/
85-
86-
- name: Prepare QEMU
87-
run: |
88-
set -x
89-
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
90-
9182
- name: Prepare swoole-cli-builder-image
9283
run: |
9384
if [ -f ${{ github.workspace }}/var/build-github-action-container/swoole-cli-builder-image.tar ] ; then
@@ -96,19 +87,18 @@ jobs:
9687
bash .github/workflows/build-alpine-builder-container.sh --platform "linux/arm64"
9788
fi
9889
99-
- name: prepare pre-built library
100-
uses: addnab/docker-run-action@v3
101-
with:
102-
image: docker.io/jingjingxyk/build-swoole-cli:all-dependencies-alpine-3.18-php8-v1.0.0-aarch64-20240618T091126Z
103-
options: -v ${{ github.workspace }}:/work -w /work -v /usr/local/swoole-cli/:/usr/local/tmp/
104-
run: |
105-
for i in `ls /usr/local/swoole-cli/`
106-
do
107-
if [ ! -d /usr/local/tmp/${i} ] ; then
108-
echo $i
109-
cp -rf /usr/local/swoole-cli/${i}/ /usr/local/tmp/${i}
110-
fi
111-
done
90+
- name: Prepare Runtime and Libraries and Extensions
91+
run: |
92+
set -x
93+
mkdir -p pool/lib
94+
mkdir -p pool/ext
95+
mkdir -p bin/runtime
96+
if [ ! -f bin/runtime/php ] ; then
97+
bash setup-php-runtime.sh
98+
fi
99+
bash sapi/download-box/download-box-get-archive-from-server.sh
100+
ls -A pool/lib/
101+
ls -A /usr/local/swoole-cli/
112102
113103
- name: Build
114104
uses: addnab/docker-run-action@v3
@@ -118,10 +108,6 @@ jobs:
118108
run: |
119109
set -eux
120110
uname -m
121-
if [ ! -f bin/runtime/php ] ; then
122-
bash setup-php-runtime.sh
123-
fi
124-
125111
export PATH=/work/bin/runtime:$PATH # 容器已经内置 php 和 composer
126112
alias php="php -d curl.cainfo=/work/bin/runtime/cacert.pem -d openssl.cafile=/work/bin/runtime/cacert.pem"
127113
@@ -131,38 +117,25 @@ jobs:
131117
132118
php prepare.php
133119
134-
bash make.sh all-library
120+
bash ./make.sh all-library
135121
136-
bash make.sh config
137-
bash make.sh build
138-
bash make.sh archive
122+
bash ./make.sh config
123+
bash ./make.sh build
124+
bash ./make.sh archive
139125
140126
- name: Show Build Result
141-
uses: addnab/docker-run-action@v3
142-
with:
143-
image: swoole-cli-builder:latest
144-
options: -v ${{ github.workspace }}:/work -w /work
145-
run: |
146-
./bin/swoole-cli -v
147-
./bin/swoole-cli -m
148-
./bin/swoole-cli --ri gd
149-
./bin/swoole-cli --ri swoole
150-
file ./bin/swoole-cli
151-
readelf -h ./bin/swoole-cli
152-
APP_VERSION=$(./bin/swoole-cli -v | awk '{print $2}')
153-
echo ${APP_VERSION}
154-
echo ${APP_VERSION} > APP_VERSION
155-
156-
./bin/swoole-cli -r "echo PHP_VERSION;"
157-
158-
./bin/swoole-cli ./vendor/bin/phpunit ./sapi/src/UnitTest/MainTest.php --list-tests
159-
./bin/swoole-cli ./vendor/bin/phpunit ./sapi/src/UnitTest/MainTest.php
160-
161-
- name: get app version
162127
run: |
163-
APP_VERSION=$(cat ./APP_VERSION)
164-
echo $APP_VERSION
128+
./bin/swoole-cli -v
129+
./bin/swoole-cli -m
130+
./bin/swoole-cli --ri gd
131+
./bin/swoole-cli --ri swoole
132+
file ./bin/swoole-cli
133+
readelf -h ./bin/swoole-cli
134+
APP_VERSION=$(./bin/swoole-cli -v | awk '{print $2}')
165135
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV
136+
./bin/swoole-cli -r "echo PHP_VERSION;"
137+
./bin/swoole-cli ./vendor/bin/phpunit ./sapi/src/UnitTest/MainTest.php --list-tests
138+
./bin/swoole-cli ./vendor/bin/phpunit ./sapi/src/UnitTest/MainTest.php
166139
167140
- name: production artifacts debug
168141
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)