Skip to content

Commit 452bde8

Browse files
committed
merge code
2 parents ed23294 + 16f629d commit 452bde8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+885
-366
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
auto-cache-pool:
12-
if: ${{ (github.repository_owner == 'swoole') }}
12+
if: ${{ (github.repository_owner == 'swoole') || (github.repository_owner == 'jingjingxyk') }}
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/cache@v4
4545
id: php-runtime-cache
4646
with:
47-
path: ${{ github.workspace }}/bin/runtime
47+
path: ${{ github.workspace }}/runtime
4848
key: ${{ runner.os }}-x86_64-php-runtime
4949

5050
- name: Cache PHP Vendor
@@ -73,24 +73,25 @@ jobs:
7373
mkdir -p pool/ext
7474
mkdir -p pool/php-tar/
7575
mkdir -p runtime/
76-
if [ ! -f runtime/php ] ; then
76+
test -f runtime/php && rm -f runtime/php
77+
if [ ! -f runtime/php/php ] ; then
7778
bash setup-php-runtime.sh
7879
fi
7980
8081
WORK_DIR=${{ github.workspace }}
81-
export PATH=${WORK_DIR}/runtime/:$PATH
82-
alias php="php -d curl.cainfo=${WORK_DIR}/runtime/cacert.pem -d openssl.cafile=${WORK_DIR}/runtime/cacert.pem"
82+
export PATH=${WORK_DIR}/runtime/php/:$PATH
83+
alias php="php -d curl.cainfo=${WORK_DIR}/runtime/php/cacert.pem -d openssl.cafile=${WORK_DIR}/runtime/php/cacert.pem"
8384
8485
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
8586
composer dump-autoload --optimize --profile --no-dev
8687
8788
php prepare.php +inotify +apcu +ds +ssh2 +uuid +protobuf +gettext --with-libavif=1 --show-tarball-hash=1
8889
php prepare.php +apcu +ds +ssh2 +uuid +protobuf +gettext --with-libavif=1 --show-tarball-hash=1 @macos
8990
# php sapi/scripts/download-php-src-archive.php
90-
php prepare.php --show-tarball-hash=1 --with-php-version=8.1.32
91-
php prepare.php --show-tarball-hash=1 --with-php-version=8.2.28
92-
php prepare.php --show-tarball-hash=1 --with-php-version=8.3.19
93-
php prepare.php --show-tarball-hash=1 --with-php-version=8.4.5
91+
php prepare.php --show-tarball-hash=1 --with-php-version=8.1.33
92+
php prepare.php --show-tarball-hash=1 --with-php-version=8.2.29
93+
php prepare.php --show-tarball-hash=1 --with-php-version=8.3.23
94+
php prepare.php --show-tarball-hash=1 --with-php-version=8.4.10
9495
9596
cd ${{ github.workspace }}/pool/
9697
zip -9 -r ${WORK_DIR}/all-deps.zip ext lib php-tar

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ case $ARCH in
5050
PLATFORM="linux/mips64le"
5151
;;
5252
'loongarch64')
53-
PLATFORM="linux/mips64le"
53+
PLATFORM="linux/loongarch64"
5454
;;
5555
esac
5656

@@ -89,6 +89,8 @@ EOF
8989

9090
: <<'EOF'
9191
92+
# https://github.com/tonistiigi/binfmt
93+
9294
# docker.io/tonistiigi/binfmt:latest
9395
"supported": [
9496
"linux/amd64",

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

Lines changed: 10 additions & 5 deletions
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__=$(
@@ -18,7 +18,9 @@ cp -f ${__PROJECT__}/sapi/quickstart/linux/debian-init.sh .
1818
cp -f ${__PROJECT__}/sapi/quickstart/linux/extra/debian-php-init.sh .
1919

2020
cat > Dockerfile <<'EOF'
21-
FROM debian:unstable-20240110-slim
21+
ARG BASE_IMAGE=debian:12
22+
FROM ${BASE_IMAGE}
23+
# FROM debian:unstable
2224
2325
ENV DEBIAN_FRONTEND=noninteractive
2426
ENV TZ=Etc/UTC
@@ -43,12 +45,15 @@ EOF
4345

4446

4547
PLATFORM='linux/amd64'
46-
48+
BASE_IMAGE="debian:12"
4749
while [ $# -gt 0 ]; do
4850
case "$1" in
4951
--platform)
5052
PLATFORM="$2"
5153
;;
54+
--container-image)
55+
BASE_IMAGE="$2"
56+
;;
5257
--*)
5358
echo "Illegal option $1"
5459
;;
@@ -59,8 +64,8 @@ done
5964

6065

6166
IMAGE='swoole-cli-builder:latest'
62-
docker buildx build -t ${IMAGE} -f ./Dockerfile . --platform ${PLATFORM}
63-
67+
docker buildx build -t ${IMAGE} -f ./Dockerfile . --platform ${PLATFORM} --build-arg BASE_IMAGE="${BASE_IMAGE}"
68+
docker images
6469
docker save -o "swoole-cli-builder-image.tar" ${IMAGE}
6570

6671

.github/workflows/linux-aarch64-qemu.yml

Lines changed: 0 additions & 114 deletions
This file was deleted.

.github/workflows/linux-aarch64.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
strategy:
1313
matrix:
1414
php-version:
15-
- "8.2.28"
16-
- "8.1.32"
17-
- "8.3.19"
18-
- "8.4.5"
15+
- "8.2.29"
16+
- "8.1.33"
17+
- "8.3.23"
18+
- "8.4.10"
1919
steps:
2020
- uses: actions/checkout@v4
2121
- name: Show Environment Info
@@ -105,7 +105,8 @@ jobs:
105105
mkdir -p pool/ext
106106
mkdir -p bin/
107107
mkdir -p runtime/
108-
if [ ! -f runtime/php ] ; then
108+
test -f runtime/php && rm -f runtime/php
109+
if [ ! -f runtime/php/php ] ; then
109110
bash setup-php-runtime.sh
110111
fi
111112
bash sapi/download-box/download-box-get-archive-from-server.sh
@@ -120,8 +121,8 @@ jobs:
120121
run: |
121122
set -eux
122123
uname -m
123-
export PATH=/work/runtime:$PATH # 容器已经内置 php 和 composer
124-
alias php="php -d curl.cainfo=/work/runtime/cacert.pem -d openssl.cafile=/work/runtime/cacert.pem"
124+
export PATH=/work/runtime/php/:$PATH # 容器已经内置 php 和 composer
125+
alias php="php -d curl.cainfo=/work/runtime/php/cacert.pem -d openssl.cafile=/work/runtime/php/cacert.pem"
125126
126127
# sed -i 's/mirrors.tuna.tsinghua.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositories
127128
# sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositories

0 commit comments

Comments
 (0)