88
99jobs :
1010 build :
11- runs-on : ubuntu-latest
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ include :
16+ - os : ubuntu-latest
17+ platform : linux
18+ - os : windows-latest
19+ platform : windows
20+ - os : macos-latest
21+ platform : macos
22+
23+ runs-on : ${{ matrix.os }}
1224
1325 services :
1426 mysql :
5163 mkdir -p php-src/ext/async
5264 cp -r async/* php-src/ext/async/
5365
54- - name : Install build dependencies
66+ - name : Install build dependencies (Ubuntu)
67+ if : matrix.os == 'ubuntu-latest'
5568 run : |
5669 sudo apt-get update
5770 sudo apt-get install -y \
6376 firebird-dev \
6477 libuv1-dev
6578
66- - name : Configure PHP
79+ - name : Install build dependencies (Windows)
80+ if : matrix.os == 'windows-latest'
81+ run : |
82+ choco install -y visualstudio2022buildtools
83+ choco install -y git
84+ choco install -y cmake
85+ choco install -y vcpkg
86+ vcpkg install libuv:x64-windows
87+ vcpkg install openssl:x64-windows
88+ vcpkg install zlib:x64-windows
89+ vcpkg integrate install
90+ shell : cmd
91+
92+ - name : Install build dependencies (macOS)
93+ if : matrix.os == 'macos-latest'
94+ run : |
95+ brew install autoconf bison re2c
96+ brew install gmp icu4c tidyhtml5
97+ brew install libzip bzip2 sqlite oniguruma curl
98+ brew install libxml2 libxslt postgresql readline ldns libsodium
99+ brew install argon2 libuv openssl@3
100+ echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
101+ echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV
102+
103+ - name : Configure PHP (Ubuntu)
104+ if : matrix.os == 'ubuntu-latest'
67105 working-directory : php-src
68106 run : |
69107 ./buildconf -f
@@ -117,7 +155,87 @@ jobs:
117155 --with-pdo-firebird \
118156 --enable-async
119157
120- - name : Build PHP
158+ - name : Configure PHP (Windows)
159+ if : matrix.os == 'windows-latest'
160+ working-directory : php-src
161+ run : |
162+ call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
163+ buildconf.bat --force
164+ configure.bat --enable-snapshot-build --enable-debug-pack --with-pdo-oci=C:\oracle\product\19.0.0\client_1\sdk,shared --with-oci8=C:\oracle\product\19.0.0\client_1\sdk,shared --enable-object-out-dir=../obj/ --enable-com-dotnet=shared --with-mcrypt=static --without-analyzer --with-pgo
165+ shell : cmd
166+
167+ - name : Build PHP (Windows)
168+ if : matrix.os == 'windows-latest'
169+ working-directory : php-src
170+ run : |
171+ call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
172+ nmake
173+ shell : cmd
174+
175+ - name : Configure PHP (macOS)
176+ if : matrix.os == 'macos-latest'
177+ working-directory : php-src
178+ run : |
179+ ./buildconf -f
180+ ./configure \
181+ --enable-zts \
182+ --enable-fpm \
183+ --enable-opcache \
184+ --with-pdo-mysql=mysqlnd \
185+ --with-mysqli=mysqlnd \
186+ --with-pdo-sqlite \
187+ --enable-intl \
188+ --without-pear \
189+ --with-zip \
190+ --with-zlib \
191+ --enable-soap \
192+ --enable-xmlreader \
193+ --with-xsl \
194+ --enable-sysvsem \
195+ --enable-sysvshm \
196+ --enable-shmop \
197+ --enable-pcntl \
198+ --with-readline \
199+ --enable-mbstring \
200+ --with-curl \
201+ --with-gettext \
202+ --enable-sockets \
203+ --with-bz2 \
204+ --with-openssl=$(brew --prefix openssl@3) \
205+ --with-gmp \
206+ --enable-bcmath \
207+ --enable-calendar \
208+ --enable-ftp \
209+ --enable-sysvmsg \
210+ --with-ffi \
211+ --enable-zend-test \
212+ --enable-dl-test=shared \
213+ --with-password-argon2 \
214+ --with-mhash \
215+ --with-sodium \
216+ --enable-dba \
217+ --with-cdb \
218+ --enable-flatfile \
219+ --enable-inifile \
220+ --with-config-file-path=/usr/local/etc \
221+ --with-config-file-scan-dir=/usr/local/etc/php.d \
222+ --enable-async
223+
224+ - name : Build PHP (macOS)
225+ if : matrix.os == 'macos-latest'
226+ working-directory : php-src
227+ run : |
228+ make -j"$(sysctl -n hw.ncpu)"
229+ sudo make install
230+ sudo mkdir -p /usr/local/etc/php.d
231+ sudo chmod 777 /usr/local/etc/php.d
232+ {
233+ echo "opcache.enable_cli=1"
234+ echo "opcache.protect_memory=1"
235+ } > /usr/local/etc/php.d/opcache.ini
236+
237+ - name : Build PHP (Ubuntu)
238+ if : matrix.os == 'ubuntu-latest'
121239 working-directory : php-src
122240 run : |
123241 make -j"$(nproc)"
@@ -129,7 +247,51 @@ jobs:
129247 echo "opcache.protect_memory=1"
130248 } > /etc/php.d/opcache.ini
131249
132- - name : Run tests
250+ - name : Run tests (Ubuntu)
251+ if : matrix.os == 'ubuntu-latest'
252+ working-directory : php-src/ext/async
253+ run : |
254+ /usr/local/bin/php -v
255+ /usr/local/bin/php ../../run-tests.php \
256+ -d zend_extension=opcache.so \
257+ -d opcache.enable_cli=1 \
258+ -d opcache.jit_buffer_size=64M \
259+ -d opcache.jit=tracing \
260+ -d zend_test.observer.enabled=1 \
261+ -d zend_test.observer.show_output=0 \
262+ -P -q -x -j2 \
263+ -g FAIL,BORK,LEAK,XLEAK \
264+ --no-progress \
265+ --offline \
266+ --show-diff \
267+ --show-slow 1000 \
268+ --set-timeout 120 \
269+ --repeat 2
270+
271+ - name : Run tests (Windows)
272+ if : matrix.os == 'windows-latest'
273+ working-directory : php-src/ext/async
274+ run : |
275+ php.exe -v
276+ php.exe ../../run-tests.php ^
277+ -d zend_extension=opcache.dll ^
278+ -d opcache.enable_cli=1 ^
279+ -d opcache.jit_buffer_size=64M ^
280+ -d opcache.jit=tracing ^
281+ -d zend_test.observer.enabled=1 ^
282+ -d zend_test.observer.show_output=0 ^
283+ -P -q -x -j2 ^
284+ -g FAIL,BORK,LEAK,XLEAK ^
285+ --no-progress ^
286+ --offline ^
287+ --show-diff ^
288+ --show-slow 1000 ^
289+ --set-timeout 120 ^
290+ --repeat 2
291+ shell : cmd
292+
293+ - name : Run tests (macOS)
294+ if : matrix.os == 'macos-latest'
133295 working-directory : php-src/ext/async
134296 run : |
135297 /usr/local/bin/php -v
0 commit comments