Skip to content

Commit d8743c5

Browse files
authored
Merge pull request #900 from jingjingxyk/experiment-t
pull main code
2 parents 5f46cbe + 3a746e3 commit d8743c5

24 files changed

+111
-138
lines changed

.github/workflows/artifact-hash.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ jobs:
3333
- name: upload artifacts to cloud object storage
3434
if: ${{ (github.repository == 'swoole/swoole-cli') && (inputs.enable_upload_cloud_object_storage == true) }}
3535
env:
36-
SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
37-
SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
36+
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
37+
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
38+
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
39+
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
3840
run: |
3941
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-all --swoole-cli-version ${{ inputs.version }}
4042

.github/workflows/linux-aarch64.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ jobs:
198198
- name: upload artifacts to cloud object storage
199199
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
200200
env:
201-
SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
202-
SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
201+
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
202+
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
203+
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
204+
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
203205
run: |
204206
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-arm64.tar.xz

.github/workflows/linux-x86_64.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ jobs:
201201
- name: upload artifacts to cloud object storage
202202
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
203203
env:
204-
SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
205-
SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
204+
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
205+
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
206+
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
207+
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
206208
run: |
207209
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-x64.tar.xz

.github/workflows/macos-aarch64.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ jobs:
155155
- name: upload artifacts to cloud object storage
156156
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
157157
env:
158-
SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
159-
SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
158+
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
159+
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
160+
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
161+
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
160162
run: |
161163
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-macos-arm64.tar.xz

.github/workflows/macos-x86_64.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ jobs:
158158
- name: upload artifacts to cloud object storage
159159
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
160160
env:
161-
SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
162-
SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
161+
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
162+
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
163+
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
164+
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
163165
run: |
164166
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-macos-x64.tar.xz

.github/workflows/windows-cygwin.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
run: |
7878
bash ./sapi/scripts/cygwin/install-re2c.sh
7979
80-
- name: Prepare
80+
- name: Configure
8181
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
8282
run: |
8383
# git config --global --add safe.directory /cygdrive/d/a/swoole-cli/swoole-cli
@@ -160,8 +160,10 @@ jobs:
160160
- name: upload artifacts to cloud object storage
161161
if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
162162
env:
163-
SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
164-
SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
163+
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
164+
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
165+
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
166+
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
165167
run: |
166168
FILE_NAME=$(ls -d swoole-cli-v*-cygwin-x64)
167169
FILE="${{ github.workspace }}/${FILE_NAME}/${FILE_NAME}.zip"

sapi/quickstart/linux/arm64/README.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
# x86_64 运行 arm64
2-
> 使用 qemu-user-static 实现
1+
# `x86_64` 平台模拟 `arm64`
32

4-
## 参考文档
5-
qemu
6-
https://www.qemu.org/
7-
https://github.com/qemu/qemu.git
8-
9-
qemu-user-static
10-
https://github.com/multiarch/qemu-user-static.git
3+
使用 `qemu-user-static` 实现
114

12-
x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建
13-
https://www.cnblogs.com/chen2ha/p/17180287.html
5+
## 参考文档
146

15-
Docker在x86架构的物理机上跑Qemu-arm 容器
16-
https://blog.csdn.net/sunSHINEEzy/article/details/80015638
7+
- [qemu 官网](https://www.qemu.org/)
8+
- [qemu GitHub](https://github.com/qemu/qemu.git)
9+
- [qemu-user-static](https://github.com/multiarch/qemu-user-static.git)
10+
- [x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建](https://www.cnblogs.com/chen2ha/p/17180287.html)
11+
- [Docker在x86架构的物理机上跑Qemu-arm 容器](https://blog.csdn.net/sunSHINEEzy/article/details/80015638)
1712

1813

sapi/quickstart/linux/connection-swoole-cli-alpine.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ __DIR__=$(
88

99
cd ${__DIR__}
1010

11-
docker exec -it swoole-cli-alpine-dev sh
11+
docker exec -it woole-cli-builder sh

sapi/quickstart/linux/extra/README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
#
1+
# 常见问题
22

3-
## 当环境中没有 PHP 解释器时 可以快速安装 PHP 解释器
4-
```bash
3+
## 快速安装 `PHP` 解释器
54

6-
# alpine
5+
### Alpine
76

8-
sh sapi/quickstart/linux/extra/alpine-php-init.sh
7+
```bash
8+
sh sapi/quickstart/linux/extra/alpine-php-init.sh
9+
```
910

10-
## debian
11+
### Debian/Ubuntu
1112

13+
```bash
1214
bash sapi/quickstart/linux/extra/debian-php-init.sh
13-
1415
```
1516

16-
```bash
17-
wget -O composer.phar https://mirrors.aliyun.com/composer/composer.phar
17+
## 安装 `Composer`
1818

19+
```bash
20+
wget -O composer.phar https://mirrors.aliyun.com/composer/composer.phar
1921
```
2022

21-
## c c++编译器 组合
23+
## `C/C++` 编译器组合
2224

23-
- 组合一 clang clang++
24-
- 组合二 gcc g++
25+
- `clang` + `clang++`
26+
- `gcc` + `g++`
2527

sapi/quickstart/linux/install-docker-compose.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then
2424

2525
# show more version info
2626
# https://github.com/docker/compose/releases
27-
VERSION="v2.29.1"
27+
VERSION="v2.32.1"
2828

2929
curl -fsSL "https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
3030

sapi/quickstart/linux/install-docker.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ while [ $# -gt 0 ]; do
2828
shift $(($# > 0 ? 1 : 0))
2929
done
3030

31-
3231
# https://github.com/docker/docker-install.git
3332
# test -f get-docker.sh || curl -fsSL https://get.docker.com -o get-docker.sh
3433

@@ -41,14 +40,15 @@ china | ustc | tuna)
4140
;;
4241
esac
4342

44-
4543
if [ -n "$http_proxy" ] || [ -n "$https_proxy" ] || [ -n "$HTTP_PROXY" ] || [ -n "$HTTPS_PROXY" ]; then
46-
echo 'Please delete proxy settings !'
47-
echo 'Execute this script again !'
48-
exit 0
44+
set +u
45+
unset http_proxy
46+
unset https_proxy
47+
unset HTTP_PROXY
48+
unset HTTPS_PROXY
49+
set -u
4950
fi
5051

51-
5252
case "$MIRROR" in
5353
china | ustc)
5454
sed -i "s@https://mirrors.aliyun.com/docker-ce@https://mirrors.ustc.edu.cn/docker-ce@g" get-docker.sh

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

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ __PROJECT__=$(
1212
cd ${__DIR__}
1313

1414
{
15-
docker stop swoole-cli-alpine-dev
1615
docker stop swoole-cli-builder
1716
sleep 5
1817
} || {

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ __PROJECT__=$(
1212
cd ${__DIR__}
1313

1414
{
15-
docker stop swoole-cli-alpine-dev
1615
docker stop swoole-cli-builder
1716
sleep 5
1817
} || {
@@ -28,9 +27,9 @@ while [ $# -gt 0 ]; do
2827
--mirror)
2928
MIRROR="$2"
3029
case "$MIRROR" in
31-
china | openatom)
32-
IMAGE="hub.atomgit.com/library/alpine:3.18"
33-
;;
30+
china | openatom)
31+
IMAGE="hub.atomgit.com/library/alpine:3.18"
32+
;;
3433
esac
3534
;;
3635
esac

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ while [ $# -gt 0 ]; do
2727
--mirror)
2828
MIRROR="$2"
2929
case "$MIRROR" in
30-
china | openatom)
31-
IMAGE="hub.atomgit.com/library/debian:12"
32-
;;
30+
china | openatom)
31+
IMAGE="hub.atomgit.com/library/debian:12"
32+
;;
3333
esac
3434
;;
3535
esac
3636
shift $(($# > 0 ? 1 : 0))
3737
done
3838

39-
4039
cd ${__DIR__}
4140
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/README.md

-16
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,5 @@ sapi\quickstart\windows\cygwin-build\install-cygwin.bat
1414

1515
```
1616

17-
# windows 软连接例子
18-
19-
```bash
20-
21-
mklink composer composer.phar
22-
23-
```
24-
25-
## 其他
26-
27-
1. [windows build native php](./windows-native.md)
28-
1. [install msys2 ](./install-msys2.md)
29-
30-
31-
32-
3317

3418

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
@echo off
2+
23
:: cygwin site: https://cygwin.com/
34
:: start https://cygwin.com/setup-x86_64.exe
45

56
setlocal enableextensions enabledelayedexpansion
67

7-
88
echo %~dp0
99
cd /d %~dp0
1010
cd /d ..\..\..\..\
1111

1212
set "__PROJECT__=%cd%"
13+
cd /d %__PROJECT__%\
1314
echo %cd%
1415
:: package separate with commas
1516

17+
1618
set SITE="https://mirrors.kernel.org/sourceware/cygwin/"
1719

1820
:getopt
@@ -29,7 +31,6 @@ if "%GITHUB_ACTIONS%"=="" (
2931
setup-x86_64.exe --quiet-mode --disable-buggy-antivirus --site %SITE%
3032
)
3133

32-
3334
setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site %SITE% --packages make,git,curl,wget,tar,libtool,bison,gcc-g++,autoconf,automake,openssl,libpcre2-devel,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel,libgmp-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel,libsqlite3-devel,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel,libicu-devel,libonig-devel,libcares-devel,libsodium-devel,libyaml-devel,libMagick-devel,libzstd-devel,libbrotli-devel,libreadline-devel,libintl-devel,libpq-devel,libssh2-devel,libidn2-devel,gettext-devel,coreutils
3435

3536
setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site %SITE% --packages zip unzip
@@ -38,6 +39,4 @@ setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disa
3839

3940
setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site %SITE% --packages libzstd-devel
4041

41-
42-
4342
endlocal

sapi/quickstart/windows/install-msys2.md sapi/quickstart/windows/msys2-build/install-msys2.md

-18
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,5 @@ pacman -Syy --noconfirm openssl-devel libreadline
3737
# msys2 环境下 拉取 swoole-cli 源码
3838
git clone --recursive https://github.com:swoole/swoole-cli.git
3939

40-
# msys2 环境下下载 cygwin (也可以用浏览器下载) 安装包
41-
wget https://cygwin.com/setup-x86_64.exe
42-
43-
# 将 cygwin 安装包 移动到 window 指定盘符根目 (这里以 C盘为例)
44-
mv setup-x86_64.exe C:/setup-x86_64.exe
45-
46-
4740
```
4841

49-
### windows 自带默认终端
50-
51-
```shell
52-
53-
# windows 开始菜单,打开 新的 windows 自带终端,执行安装 cygwin
54-
cd c:\
55-
56-
# 添加 pgsql
57-
setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages libpq5 libpq-deve
58-
59-
```

sapi/quickstart/windows/windows-native.md

-31
This file was deleted.

sapi/quickstart/windows/windows.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 构建window PHP 工具 和 参考
2+
3+
[download windows PHP ](https://windows.php.net/download#php-8.2)
4+
5+
[windows build php 步骤](https://wiki.php.net/internals/windows/stepbystepbuild)
6+
7+
## windows 环境下 git 配置
8+
9+
```shell
10+
git config --global core.autocrlf false
11+
git config --global core.eol lf
12+
git config --global core.ignorecase false
13+
git config core.ignorecase false # 设置 Git 在 Windows 上也区分大小写
14+
```
15+
16+
[Latest VC++](https://learn.microsoft.com/en-AU/cpp/windows/latest-supported-vc-redist)
17+
[7zip](https://7-zip.org/)
18+
[visualstudio](https://visualstudio.microsoft.com/zh-hans/downloads/)
19+
[windows-sdk](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/)
20+
21+
## windows 软连接例子
22+
23+
```bash
24+
25+
mklink composer composer.phar
26+
27+
```

0 commit comments

Comments
 (0)