-
Notifications
You must be signed in to change notification settings - Fork 35
76 lines (72 loc) · 1.94 KB
/
ext.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: ext-yasd
on: [push, pull_request]
jobs:
build-yasd:
runs-on: ${{ matrix.os }}
env:
SWOOLE_VERSION: 4.8.7
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
php: [7.2, 7.3, 7.4, 8.0, 8.1]
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
- name: Show machine information
run: |
date
env
uname -a
ulimit -a
php -v
php -m
php --ini
ls -al
pwd
echo "`git log -20 --pretty --oneline`"
echo "`git log -10 --stat --pretty --oneline`"
- name: Install swoole
run: |
wget https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
tar -xf swoole.tar.gz -C swoole --strip-components=1
rm swoole.tar.gz
cd swoole
phpize
./configure
make -j$(nproc)
sudo make install
- if: startsWith(runner.os, 'Linux')
name: Install dependencies on Linux
run: |
sudo apt-get update
sudo apt-get install libboost-all-dev
- if: startsWith(runner.os, 'macOS')
name: Install dependencies on macOS
run: |
brew install boost
- name: Build extension
run: |
phpize
./configure
make clean
make -j$(sysctl -n hw.ncpu)
sudo make install
php -d zend_extension=$PWD/modules/yasd.so --ri yasd
- name: Run tests
run: |
composer install
export PHP_INI_SCAN_DIR=$PWD/tests/extension_ini
cd tests
./start.sh
build-alpine-latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: build
run: cp .github/workflows/alpine.Dockerfile alpine.Dockerfile && docker build -t yasd . -f alpine.Dockerfile