-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 2.39 KB
/
php.yml
File metadata and controls
57 lines (51 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build PHP
on:
workflow_dispatch:
env:
EXTENSIONS: amqp,apcu,ast,bcmath,brotli,calendar,ctype,curl,dom,ds,exif,ffi,fileinfo,filter,gd,gettext,iconv,igbinary,imagick,inotify,intl,ldap,libxml,mbregex,mbstring,memcache,memcached,mongodb,msgpack,mysqli,mysqlnd,opcache,openssl,opentelemetry,password-argon2,pcntl,pdo,pdo_mysql,pgsql,phar,posix,rdkafka,readline,redis,session,shmop,simplexml,soap,sockets,sodium,sqlite3,swoole,swoole-hook-mysql,swoole-hook-pgsql,swoole-hook-sqlite,tokenizer,xlswriter,xml,xmlreader,xmlwriter,xsl,yaml,zip,zlib,zstd
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
strategy:
fail-fast: false
matrix:
php:
- version: 8.1
swoole: v5.1.8
- version: 8.2
swoole: v5.1.8
- version: 8.3
swoole: v5.1.8
- version: 8.4
swoole: v6.0.2
platform:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.platform.runner }}
name: "Build ${{ matrix.php.version }} ${{ matrix.platform.arch }}"
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
with:
repository: crazywhalecc/static-php-cli
ref: 2.7.9
- name: Update Swoole version to ${{ matrix.php.swoole }}
run: |
sed -i '/"swoole": {/,/}/ s/"rev": "[^"]*"/"rev": "${{ matrix.php.swoole }}"/' config/source.json
echo "Updated swoole rev to ${{ matrix.php.swoole }}"
grep -A 5 -B 1 '"swoole"' config/source.json || echo "swoole not found in config file"
- name: Update MongoDB driver to 1.x versions only
run: |
sed -i '/"mongodb": {/,/}/ s/"match": "[^"]*"/"match": "mongodb-1\\\\.[0-9]+\\\\.[0-9]+\\\\.tgz"/' config/source.json
echo "Updated mongodb match to 1.x versions only"
grep -A 5 -B 1 '"mongodb"' config/source.json || echo "mongodb not found in config file"
- run: ./bin/spc-gnu-docker download --with-php=${{ matrix.php.version }} --for-extensions=${{ env.EXTENSIONS }},xdebug
- run: ./bin/spc-gnu-docker build ${{ env.EXTENSIONS }} --build-cli --build-shared=xdebug
- uses: actions/upload-artifact@v4
with:
name: php${{ matrix.php.version }}-${{ matrix.platform.arch }}
path: |
buildroot/bin/php
buildroot/modules/xdebug.so