-
Notifications
You must be signed in to change notification settings - Fork 57
54 lines (42 loc) · 1.45 KB
/
build-swoole.yml
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
name: Build Swoole
on: [ push, pull_request, workflow_dispatch ]
jobs:
build-swoole:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
name: PHP ${{ matrix.php }} - Swoole
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2, phpize
coverage: none
- name: Download Latest Swoole
run: |
set -ex
mkdir swoole
curl -sfL https://github.com/swoole/swoole-src/archive/master.tar.gz -o swoole.tar.gz
tar xfz swoole.tar.gz --strip-components=1 -C swoole
- name: Checkout Source Code of Swoole Library
uses: actions/checkout@v4
with:
path: './swoole/library'
- name: Build Swoole
run: |
set -ex
cd swoole
composer install -d ./tools -n -q --no-progress
cat ext-src/php_swoole_library.h | grep '/* $Id:' # the commit # of Swoole Library used in Swoole.
php ./tools/build-library.php
cat ext-src/php_swoole_library.h | grep '/* $Id:' # the commit # of current Swoole Library.
phpize
./configure
make -j$(nproc)
sudo make install
echo "extension=swoole" | sudo tee "$(php-config --ini-dir)/ext-swoole.ini"
- name: Check Swoole Installation
run: php -v && php --ri swoole