Skip to content

Commit 507cd70

Browse files
committed
% simply CI
1 parent 47e4437 commit 507cd70

File tree

2 files changed

+174
-23
lines changed

2 files changed

+174
-23
lines changed

.github/workflows/build-full.yml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
name: PHP Build
2+
3+
on:
4+
push:
5+
branches: [build]
6+
pull_request:
7+
branches: [build]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
services:
14+
mysql:
15+
image: mysql:8.3
16+
env:
17+
MYSQL_ROOT_PASSWORD: ''
18+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
19+
MYSQL_DATABASE: test
20+
ports: ['3306:3306']
21+
options: >-
22+
--health-cmd="mysqladmin ping --silent"
23+
--health-interval=10s
24+
--health-timeout=5s
25+
--health-retries=5
26+
27+
postgres:
28+
image: postgres:16
29+
env:
30+
POSTGRES_PASSWORD: postgres
31+
POSTGRES_DB: test
32+
ports: ['5432:5432']
33+
options: >-
34+
--health-cmd="pg_isready"
35+
--health-interval=10s
36+
--health-timeout=5s
37+
--health-retries=5
38+
39+
steps:
40+
- name: Checkout php-async repo
41+
uses: actions/checkout@v4
42+
with:
43+
path: async
44+
45+
- name: Clone php-src (true-async-stable)
46+
run: |
47+
git clone --depth=1 --branch=true-async-stable https://github.com/true-async/php-src php-src
48+
49+
- name: Copy php-async extension into php-src
50+
run: |
51+
mkdir -p php-src/ext/async
52+
cp -r async/* php-src/ext/async/
53+
54+
- name: Install build dependencies
55+
run: |
56+
sudo apt-get update
57+
sudo apt-get install -y \
58+
gcc g++ autoconf bison re2c locales locales-all ldap-utils openssl slapd \
59+
libgmp-dev libicu-dev libtidy-dev libenchant-2-dev libsasl2-dev libxpm-dev \
60+
libzip-dev libbz2-dev libsqlite3-dev libwebp-dev libonig-dev libcurl4-openssl-dev \
61+
libxml2-dev libxslt1-dev libpq-dev libreadline-dev libldap2-dev libsodium-dev \
62+
libargon2-dev libsnmp-dev snmp snmp-mibs-downloader snmpd freetds-dev dovecot-core \
63+
sendmail firebird-dev liblmdb-dev libtokyocabinet-dev libdb-dev libqdbm-dev \
64+
libjpeg-dev libpng-dev libfreetype6-dev libuv1-dev
65+
g++ --version
66+
sudo mkdir -p /var/lib/snmp && sudo chown $(id -u):$(id -g) /var/lib/snmp
67+
68+
- name: Configure PHP
69+
working-directory: php-src
70+
run: |
71+
./buildconf -f
72+
./configure \
73+
--enable-zts \
74+
--enable-option-checking=fatal \
75+
--prefix=/usr \
76+
--disable-phpdbg \
77+
--enable-fpm \
78+
--enable-opcache \
79+
--with-pdo-mysql=mysqlnd \
80+
--with-mysqli=mysqlnd \
81+
--with-pgsql \
82+
--with-pdo-pgsql \
83+
--with-pdo-sqlite \
84+
--enable-intl \
85+
--without-pear \
86+
--enable-gd \
87+
--with-jpeg \
88+
--with-webp \
89+
--with-freetype \
90+
--with-xpm \
91+
--enable-exif \
92+
--with-zip \
93+
--with-zlib \
94+
--enable-soap \
95+
--enable-xmlreader \
96+
--with-xsl \
97+
--with-tidy \
98+
--enable-sysvsem \
99+
--enable-sysvshm \
100+
--enable-shmop \
101+
--enable-pcntl \
102+
--with-readline \
103+
--enable-mbstring \
104+
--with-curl \
105+
--with-gettext \
106+
--enable-sockets \
107+
--with-bz2 \
108+
--with-openssl \
109+
--with-gmp \
110+
--enable-bcmath \
111+
--enable-calendar \
112+
--enable-ftp \
113+
--with-enchant=/usr \
114+
--enable-sysvmsg \
115+
--with-ffi \
116+
--enable-zend-test \
117+
--enable-dl-test=shared \
118+
--with-ldap \
119+
--with-ldap-sasl \
120+
--with-password-argon2 \
121+
--with-mhash \
122+
--with-sodium \
123+
--enable-dba \
124+
--with-cdb \
125+
--enable-flatfile \
126+
--enable-inifile \
127+
--with-tcadb \
128+
--with-lmdb \
129+
--with-qdbm \
130+
--with-snmp \
131+
--with-config-file-path=/etc \
132+
--with-config-file-scan-dir=/etc/php.d \
133+
--with-pdo-firebird \
134+
--enable-async
135+
136+
- name: Build PHP
137+
working-directory: php-src
138+
run: |
139+
make -j"$(nproc)"
140+
sudo make install
141+
sudo mkdir -p /etc/php.d
142+
sudo chmod 777 /etc/php.d
143+
{
144+
echo "opcache.enable_cli=1"
145+
echo "opcache.protect_memory=1"
146+
} > /etc/php.d/opcache.ini
147+
148+
- name: Run tests
149+
working-directory: php-src
150+
env:
151+
MIBS: +ALL
152+
run: |
153+
sapi/cli/php run-tests.php \
154+
-d zend_extension=opcache.so \
155+
-d opcache.enable_cli=1 \
156+
-d opcache.jit_buffer_size=64M \
157+
-d opcache.jit=tracing \
158+
-d zend_test.observer.enabled=1 \
159+
-d zend_test.observer.show_output=0 \
160+
-P -q -x -j2 \
161+
-g FAIL,BORK,LEAK,XLEAK \
162+
--no-progress \
163+
--offline \
164+
--show-diff \
165+
--show-slow 1000 \
166+
--set-timeout 120 \
167+
--repeat 2

.github/workflows/build.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,20 @@ jobs:
5555
run: |
5656
sudo apt-get update
5757
sudo apt-get install -y \
58-
gcc g++ autoconf bison re2c locales locales-all ldap-utils openssl slapd \
59-
libgmp-dev libicu-dev libtidy-dev libenchant-2-dev libsasl2-dev libxpm-dev \
60-
libzip-dev libbz2-dev libsqlite3-dev libwebp-dev libonig-dev libcurl4-openssl-dev \
58+
gcc g++ autoconf bison re2c \
59+
libgmp-dev libicu-dev libtidy-dev libsasl2-dev \
60+
libzip-dev libbz2-dev libsqlite3-dev libonig-dev libcurl4-openssl-dev \
6161
libxml2-dev libxslt1-dev libpq-dev libreadline-dev libldap2-dev libsodium-dev \
62-
libargon2-dev libsnmp-dev snmp snmp-mibs-downloader snmpd freetds-dev dovecot-core \
63-
sendmail firebird-dev liblmdb-dev libtokyocabinet-dev libdb-dev libqdbm-dev \
64-
libjpeg-dev libpng-dev libfreetype6-dev libuv1-dev
65-
g++ --version
66-
sudo mkdir -p /var/lib/snmp && sudo chown $(id -u):$(id -g) /var/lib/snmp
62+
libargon2-dev \
63+
firebird-dev \
64+
libuv1-dev
6765
6866
- name: Configure PHP
6967
working-directory: php-src
7068
run: |
7169
./buildconf -f
7270
./configure \
7371
--enable-zts \
74-
--enable-option-checking=fatal \
75-
--prefix=/usr \
76-
--disable-phpdbg \
7772
--enable-fpm \
7873
--enable-opcache \
7974
--with-pdo-mysql=mysqlnd \
@@ -83,12 +78,6 @@ jobs:
8378
--with-pdo-sqlite \
8479
--enable-intl \
8580
--without-pear \
86-
--enable-gd \
87-
--with-jpeg \
88-
--with-webp \
89-
--with-freetype \
90-
--with-xpm \
91-
--enable-exif \
9281
--with-zip \
9382
--with-zlib \
9483
--enable-soap \
@@ -110,7 +99,6 @@ jobs:
11099
--enable-bcmath \
111100
--enable-calendar \
112101
--enable-ftp \
113-
--with-enchant=/usr \
114102
--enable-sysvmsg \
115103
--with-ffi \
116104
--enable-zend-test \
@@ -124,10 +112,6 @@ jobs:
124112
--with-cdb \
125113
--enable-flatfile \
126114
--enable-inifile \
127-
--with-tcadb \
128-
--with-lmdb \
129-
--with-qdbm \
130-
--with-snmp \
131115
--with-config-file-path=/etc \
132116
--with-config-file-scan-dir=/etc/php.d \
133117
--with-pdo-firebird \
@@ -146,7 +130,7 @@ jobs:
146130
} > /etc/php.d/opcache.ini
147131
148132
- name: Run tests
149-
working-directory: php-src
133+
working-directory: php-src/ext/async
150134
env:
151135
MIBS: +ALL
152136
run: |

0 commit comments

Comments
 (0)