45
45
CXX : ccache g++
46
46
jobs :
47
47
LINUX_X64 :
48
+ if : false
48
49
services :
49
50
mysql :
50
51
image : mysql:8
@@ -150,6 +151,7 @@ jobs:
150
151
if : ${{ !matrix.asan }}
151
152
uses : ./.github/actions/verify-generated-files
152
153
MACOS_DEBUG_NTS :
154
+ if : false
153
155
runs-on : macos-13
154
156
steps :
155
157
- name : git checkout
@@ -182,6 +184,7 @@ jobs:
182
184
- name : Verify generated files are up to date
183
185
uses : ./.github/actions/verify-generated-files
184
186
WINDOWS :
187
+ if : false
185
188
name : WINDOWS_X64_ZTS
186
189
runs-on : windows-2019
187
190
env :
@@ -208,7 +211,8 @@ jobs:
208
211
run : .github/scripts/windows/test.bat
209
212
BENCHMARKING :
210
213
name : BENCHMARKING
211
- if : github.repository_owner == 'php' || github.event_name == 'pull_request'
214
+ # if: github.repository_owner == 'php' || github.event_name == 'pull_request'
215
+ if : false
212
216
runs-on : ubuntu-22.04
213
217
steps :
214
218
- name : git checkout
@@ -307,3 +311,190 @@ jobs:
307
311
name : profiles
308
312
path : ${{ github.workspace }}/benchmark/profiles
309
313
retention-days : 30
314
+ COMMUNITY :
315
+ strategy :
316
+ fail-fast : false
317
+ matrix :
318
+ branch :
319
+ - { name: 'master', ref: 'master', major: 8, minor: 4 }
320
+ - { name: 'PHP-8.3', ref: 'PHP-8.3', major: 8, minor: 3 }
321
+ type : ['asan', 'verify_type_inference']
322
+ # These branches don't include type verification
323
+ exclude :
324
+ - { branch: { name: 'PHP-8.1', ref: 'PHP-8.1', major: 8, minor: 1 }, type: 'verify_type_inference' }
325
+ - { branch: { name: 'PHP-8.2', ref: 'PHP-8.2', major: 8, minor: 2 }, type: 'verify_type_inference' }
326
+ - { branch: { name: 'PHP-8.3', ref: 'PHP-8.3', major: 8, minor: 3 }, type: 'verify_type_inference' }
327
+ name : " ${{ matrix.branch.name }}_COMMUNITY_${{ matrix.type }}"
328
+ runs-on : ubuntu-${{ matrix.branch.version.minor >= 3 && '22.04' || '20.04' }}
329
+ env :
330
+ ASAN_OPTIONS : exitcode=139
331
+ UBSAN_OPTIONS : print_stacktrace=1
332
+ USE_ZEND_ALLOC : 0
333
+ USE_TRACKED_ALLOC : 1
334
+ steps :
335
+ - name : git checkout
336
+ uses : actions/checkout@v4
337
+ with :
338
+ ref : ${{ matrix.branch.ref }}
339
+ - name : apt
340
+ uses : ./.github/actions/apt-x64
341
+ - name : ./configure
342
+ uses : ./.github/actions/configure-x64
343
+ with :
344
+ # CFLAGS removes O2, so we have to add it again...
345
+ configurationParameters : >-
346
+ --enable-zts
347
+ ${{ matrix.type == 'asan' && '--enable-debug CFLAGS="-fsanitize=undefined,address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address"' || '' }}
348
+ ${{ matrix.type == 'verify_type_inference' && 'CFLAGS="-DZEND_VERIFY_TYPE_INFERENCE -O2"' || '' }}
349
+ - name : make
350
+ run : make -j$(/usr/bin/nproc) >/dev/null
351
+ - name : make install
352
+ uses : ./.github/actions/install-linux
353
+ - name : Setup
354
+ run : |
355
+ sudo service mysql start
356
+ mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
357
+ mysql -uroot -proot -e "SET GLOBAL local_infile = true"
358
+ - name : Enable Opcache
359
+ run : |
360
+ echo memory_limit=-1 >> /etc/php.d/opcache.ini
361
+ echo zend_extension=opcache.so > /etc/php.d/opcache.ini
362
+ echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
363
+ echo opcache.enable=1 >> /etc/php.d/opcache.ini
364
+ echo opcache.memory_consumption=256M >> /etc/php.d/opcache.ini
365
+ echo opcache.file_update_protection=0 >> /etc/php.d/opcache.ini
366
+ echo opcache.interned_strings_buffer=64 >> /etc/php.d/opcache.ini
367
+ echo opcache.max_accelerated_files=100000 >> /etc/php.d/opcache.ini
368
+ - name : Enable JIT
369
+ if : matrix.type != 'verify_type_inference'
370
+ run : |
371
+ echo opcache.jit=tracing >> /etc/php.d/opcache.ini
372
+ echo opcache.jit_buffer_size=1G >> /etc/php.d/opcache.ini
373
+ echo opcache.jit_max_root_traces=100000 >> /etc/php.d/opcache.ini
374
+ echo opcache.jit_max_side_traces=100000 >> /etc/php.d/opcache.ini
375
+ echo opcache.jit_max_exit_counters=100000 >> /etc/php.d/opcache.ini
376
+ echo opcache.jit_hot_loop=1 >> /etc/php.d/opcache.ini
377
+ echo opcache.jit_hot_func=1 >> /etc/php.d/opcache.ini
378
+ echo opcache.jit_hot_return=1 >> /etc/php.d/opcache.ini
379
+ echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini
380
+ php -v
381
+ - name : Test AMPHP
382
+ if : matrix.branch.ref != 'PHP-8.0'
383
+ run : |
384
+ repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server"
385
+ X=0
386
+ for repository in $repositories; do
387
+ printf "Testing amp/%s\n" "$repository"
388
+ git clone "https://github.com/amphp/$repository.git" "amphp-$repository" --depth 1
389
+ cd "amphp-$repository"
390
+ git rev-parse HEAD
391
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
392
+ vendor/bin/phpunit || EXIT_CODE=$?
393
+ if [ ${EXIT_CODE:-0} -gt 128 ]; then
394
+ X=1;
395
+ fi
396
+ cd ..
397
+ done
398
+ exit $X
399
+ - name : Test Laravel
400
+ if : matrix.branch.ref != 'PHP-8.0'
401
+ run : |
402
+ git clone https://github.com/laravel/framework.git --branch=master --depth=1
403
+ cd framework
404
+ git rev-parse HEAD
405
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
406
+ # Hack to disable a test that hangs
407
+ php -r '$c = file_get_contents("tests/Filesystem/FilesystemTest.php"); $c = str_replace("public function testSharedGet()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSharedGet()", $c); file_put_contents("tests/Filesystem/FilesystemTest.php", $c);'
408
+ php vendor/bin/phpunit --exclude-group skip || EXIT_CODE=$?
409
+ if [ ${EXIT_CODE:-0} -gt 128 ]; then
410
+ exit 1
411
+ fi
412
+ - name : Test ReactPHP
413
+ if : matrix.branch.ref != 'PHP-8.0'
414
+ run : |
415
+ repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream"
416
+ X=0
417
+ for repository in $repositories; do
418
+ printf "Testing reactphp/%s\n" "$repository"
419
+ git clone "https://github.com/reactphp/$repository.git" "reactphp-$repository" --depth 1
420
+ cd "reactphp-$repository"
421
+ git rev-parse HEAD
422
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
423
+ vendor/bin/phpunit || EXIT_CODE=$?
424
+ if [ $[EXIT_CODE:-0} -gt 128 ]; then
425
+ X=1;
426
+ fi
427
+ cd ..
428
+ done
429
+ exit $X
430
+ - name : Test Revolt PHP
431
+ if : matrix.branch.ref != 'PHP-8.0'
432
+ run : |
433
+ git clone https://github.com/revoltphp/event-loop.git --depth=1
434
+ cd event-loop
435
+ git rev-parse HEAD
436
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
437
+ vendor/bin/phpunit || EXIT_CODE=$?
438
+ if [ ${EXIT_CODE:-0} -gt 128 ]; then
439
+ exit 1
440
+ fi
441
+ - name : Test Symfony
442
+ if : matrix.branch.ref != 'PHP-8.0'
443
+ run : |
444
+ git clone https://github.com/symfony/symfony.git --depth=1
445
+ cd symfony
446
+ git rev-parse HEAD
447
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
448
+ php ./phpunit install
449
+ # Test causes a heap-buffer-overflow but I cannot reproduce it locally...
450
+ php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "/** @group skip */\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
451
+ # Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
452
+ php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("*/\n public function testCastNonTrailingCharPointer()", "* @group skip\n */\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
453
+ export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
454
+ X=0
455
+ for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
456
+ php ./phpunit $component --exclude-group tty,benchmark,intl-data,transient --exclude-group skip || EXIT_CODE=$?
457
+ if [ ${EXIT_CODE:-0} -gt 128 ]; then
458
+ X=1;
459
+ fi
460
+ done
461
+ exit $X
462
+ - name : Test PHPUnit
463
+ if : always()
464
+ run : |
465
+ git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
466
+ cd phpunit
467
+ git rev-parse HEAD
468
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
469
+ php ./phpunit || EXIT_CODE=$?
470
+ if [ ${EXIT_CODE:-0} -gt 128 ]; then
471
+ exit 1
472
+ fi
473
+ - name : ' Symfony Preloading'
474
+ if : matrix.branch.ref != 'PHP-8.0'
475
+ run : |
476
+ php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
477
+ cd symfony_demo
478
+ git rev-parse HEAD
479
+ sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
480
+ php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
481
+ - name : Test Wordpress
482
+ if : always()
483
+ run : |
484
+ git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
485
+ cd wordpress
486
+ git rev-parse HEAD
487
+ php /usr/bin/composer install --no-progress --ignore-platform-reqs
488
+ cp wp-tests-config-sample.php wp-tests-config.php
489
+ sed -i 's/youremptytestdbnamehere/test/g' wp-tests-config.php
490
+ sed -i 's/yourusernamehere/root/g' wp-tests-config.php
491
+ sed -i 's/yourpasswordhere/root/g' wp-tests-config.php
492
+ php vendor/bin/phpunit || EXIT_CODE=$?
493
+ if [ $EXIT_CODE -gt 128 ]; then
494
+ exit 1
495
+ fi
496
+ - name : Notify Slack
497
+ if : failure()
498
+ uses : ./.github/actions/notify-slack
499
+ with :
500
+ token : ${{ secrets.ACTION_MONITORING_SLACK }}
0 commit comments