88jobs :
99 linux-aarch64 :
1010 if : 1
11- runs-on : ubuntu-latest
11+ runs-on : ubuntu-24.04-arm
1212 strategy :
1313 matrix :
1414 php-version :
3131 uname -s
3232 uname -m
3333 uname -r
34+
35+ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
36+ cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
37+ cat /proc/cpuinfo | grep "cpu cores" | uniq
38+ cat /proc/cpuinfo| grep "processor"| wc -l
39+ lscpu
40+
3441 export IPV6=$(ip -6 address show | grep inet6 | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
3542 export IPV4=$(ip -4 address show | grep inet | grep -v 127.0.0 | awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')
3643 echo $IPV4
@@ -50,14 +57,14 @@ jobs:
5057
5158 - name : Cache PHP Runtime
5259 uses : actions/cache@v4
53- id : php-runtime-cache
60+ id : php-runtime-cache-aarch64
5461 with :
5562 path : ${{ github.workspace }}/bin/runtime
5663 key : ${{ runner.os }}-aarch64-php-runtime
5764
5865 - name : Cache PHP Vendor
5966 uses : actions/cache@v4
60- id : php-vendor-cache
67+ id : php-vendor-cache-aarch64
6168 with :
6269 path : ${{ github.workspace }}/vendor
6370 key : ${{ runner.os }}-aarch64-php-vendor
@@ -71,35 +78,18 @@ jobs:
7178
7279 - name : Cache all-library
7380 uses : actions/cache@v4
74- id : all-library-cache
81+ id : all-library-cache-aarch64
7582 with :
7683 path : /usr/local/swoole-cli
7784 key : ${{ github.head_ref || github.ref_name }}-${{ runner.os }}-aarch64-all-library
7885
7986 - name : Cache swoole-cli-builder-image
8087 uses : actions/cache@v4
81- id : swoole-cli-builder-image-aarch64- cache
88+ id : swoole-cli-builder-image-cache-aarch64
8289 with :
8390 path : ${{ github.workspace }}/var/build-github-action-container/swoole-cli-builder-image.tar
8491 key : ${{ runner.os }}-aarch64-swoole-cli-builder-image
8592
86- - name : Prepare Libraries and Extensions
87- run : |
88- set -x
89- mkdir -p pool/lib
90- mkdir -p pool/ext
91- mkdir -p bin/runtime
92-
93- bash sapi/download-box/download-box-get-archive-from-server.sh
94-
95- ls -A pool/lib/
96- ls -A /usr/local/swoole-cli/
97-
98- - name : Prepare QEMU
99- run : |
100- set -x
101- sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
102-
10393 - name : Prepare swoole-cli-builder-image
10494 run : |
10595 if [ -f ${{ github.workspace }}/var/build-github-action-container/swoole-cli-builder-image.tar ] ; then
@@ -108,19 +98,18 @@ jobs:
10898 bash .github/workflows/build-alpine-builder-container.sh --platform "linux/arm64"
10999 fi
110100
111- - name : prepare pre-built library
112- uses : addnab/docker-run-action@v3
113- with :
114- image : docker.io/jingjingxyk/build-swoole-cli:all-dependencies-alpine-3.18-php8-v1.0.0-aarch64-20240618T091126Z
115- options : -v ${{ github.workspace }}:/work -w /work -v /usr/local/swoole-cli/:/usr/local/tmp/
116- run : |
117- for i in `ls /usr/local/swoole-cli/`
118- do
119- if [ ! -d /usr/local/tmp/${i} ] ; then
120- echo $i
121- cp -rf /usr/local/swoole-cli/${i}/ /usr/local/tmp/${i}
122- fi
123- done
101+ - name : Prepare Runtime and Libraries and Extensions
102+ run : |
103+ set -x
104+ mkdir -p pool/lib
105+ mkdir -p pool/ext
106+ mkdir -p bin/runtime
107+ if [ ! -f bin/runtime/php ] ; then
108+ bash setup-php-runtime.sh
109+ fi
110+ bash sapi/download-box/download-box-get-archive-from-server.sh
111+ ls -A pool/lib/
112+ ls -A /usr/local/swoole-cli/
124113
125114 - name : Build
126115 uses : addnab/docker-run-action@v3
@@ -130,10 +119,6 @@ jobs:
130119 run : |
131120 set -eux
132121 uname -m
133- if [ ! -f bin/runtime/php ] ; then
134- bash setup-php-runtime.sh
135- fi
136-
137122 export PATH=/work/bin/runtime:$PATH # 容器已经内置 php 和 composer
138123 alias php="php -d curl.cainfo=/work/bin/runtime/cacert.pem -d openssl.cafile=/work/bin/runtime/cacert.pem"
139124
@@ -149,25 +134,21 @@ jobs:
149134
150135 bash make-install-deps.sh
151136
152- bash make.sh all-library
137+ bash ./ make.sh all-library
153138
154- bash make.sh config
155- bash make.sh build
156- bash make.sh archive
139+ bash ./ make.sh config
140+ bash ./ make.sh build
141+ bash ./ make.sh archive
157142
158143 - name : Show Build Result
159- uses : addnab/docker-run-action@v3
160- with :
161- image : swoole-cli-builder:latest
162- options : -v ${{ github.workspace }}:/work -w /work
163- run : |
164- ./thirdparty/php-src/sapi/fpm/php-fpm -v
165- ./thirdparty/php-src/sapi/fpm/php-fpm -m
166- file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm
167- readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm
168- APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm -v | head -n 1 | awk '{print $2}')
169- echo ${APP_VERSION}
170- echo ${APP_VERSION} > APP_VERSION
144+ run : |
145+ ./thirdparty/php-src/sapi/fpm/php-fpm -v
146+ ./thirdparty/php-src/sapi/fpm/php-fpm -m
147+ file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm
148+ readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm
149+ APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm -v | head -n 1 | awk '{print $2}')
150+ echo ${APP_VERSION}
151+ echo ${APP_VERSION} > APP_VERSION
171152
172153 - name : get app version
173154 run : |
@@ -182,6 +163,7 @@ jobs:
182163 retention-days : 90
183164 path : ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php-fpm
184165
166+
185167 - name : production artifacts
186168 uses : actions/upload-artifact@v4
187169 with :
0 commit comments