Skip to content

Commit 056c63f

Browse files
committed
Rename & cleanup
1 parent 1048945 commit 056c63f

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

.github/patch.php renamed to .github/jit_check.php

-7
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,21 @@
44
$status = opcache_get_status(false);
55
var_dump($status);
66

7-
$ok = true;
87
if ($status["memory_usage"]["free_memory"] < 10*1024*1024) {
98
echo "Not enough free opcache memory!".PHP_EOL;
10-
$ok = false;
119
}
1210
if ($status["interned_strings_usage"]["free_memory"] < 1*1024*1024) {
1311
echo "Not enough free interned strings memory!".PHP_EOL;
14-
$ok = false;
1512
}
1613
if ($status["jit"]["buffer_free"] < 10*1024*1024) {
1714
echo "Not enough free JIT memory!".PHP_EOL;
18-
$ok = false;
1915
}
2016
if (!$status["jit"]["on"]) {
2117
echo "JIT is not enabled!".PHP_EOL;
22-
$ok = false;
2318
}
2419

2520
unset($status);
2621
gc_collect_cycles();
27-
28-
if (!$ok) die(130);
2922
});
3023

3124
$argc--;

.github/workflows/nightly.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ jobs:
360360
# Needed to avoid overwriting JIT config
361361
export PSALM_ALLOW_XDEBUG=1
362362
php /usr/bin/composer install --no-progress --ignore-platform-reqs
363-
php $GITHUB_WORKSPACE/.github/patch.php ./psalm --no-cache || exit $?
363+
php $GITHUB_WORKSPACE/.github/jit_check.php ./psalm --no-cache || exit $?
364364
- name: Test PHPStan
365365
if: matrix.branch.ref != 'PHP-8.0'
366366
run: |
@@ -370,8 +370,8 @@ jobs:
370370
sed -E 's/phpVersion(.*)max[^)]+/phpVersion\1max(89999/g' conf/parametersSchema.neon -i
371371
php /usr/bin/composer install --no-progress --ignore-platform-reqs
372372
export ASAN_OPTIONS=exitcode=139
373-
php $GITHUB_WORKSPACE/.github/patch.php bin/phpstan clear-result-cache
374-
php $GITHUB_WORKSPACE/.github/patch.php bin/phpstan || exit $?
373+
php $GITHUB_WORKSPACE/.github/jit_check.php bin/phpstan clear-result-cache
374+
php $GITHUB_WORKSPACE/.github/jit_check.php bin/phpstan || exit $?
375375
- name: Test AMPHP
376376
if: matrix.branch.ref != 'PHP-8.0'
377377
run: |
@@ -384,7 +384,7 @@ jobs:
384384
git rev-parse HEAD
385385
php /usr/bin/composer install --no-progress --ignore-platform-reqs
386386
export ASAN_OPTIONS=exitcode=139
387-
php $GITHUB_WORKSPACE/.github/patch.php vendor/bin/phpunit || EXIT_CODE=$?
387+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/phpunit || EXIT_CODE=$?
388388
if [ ${EXIT_CODE:-0} -gt 128 ]; then
389389
X=1;
390390
fi
@@ -401,7 +401,7 @@ jobs:
401401
# Hack to disable a test that hangs
402402
php -r '$c = file_get_contents("tests/Filesystem/FilesystemTest.php"); $c = str_replace("*/\n public function testSharedGet()", "* @group skip\n */\n public function testSharedGet()", $c); file_put_contents("tests/Filesystem/FilesystemTest.php", $c);'
403403
export ASAN_OPTIONS=exitcode=139
404-
php $GITHUB_WORKSPACE/.github/patch.php vendor/bin/phpunit --exclude-group skip || EXIT_CODE=$?
404+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/phpunit --exclude-group skip || EXIT_CODE=$?
405405
if [ ${EXIT_CODE:-0} -gt 128 ]; then
406406
exit 1
407407
fi
@@ -417,7 +417,7 @@ jobs:
417417
git rev-parse HEAD
418418
php /usr/bin/composer install --no-progress --ignore-platform-reqs
419419
export ASAN_OPTIONS=exitcode=139
420-
php $GITHUB_WORKSPACE/.github/patch.php vendor/bin/phpunit || EXIT_CODE=$?
420+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/phpunit || EXIT_CODE=$?
421421
if [ $[EXIT_CODE:-0} -gt 128 ]; then
422422
X=1;
423423
fi
@@ -432,7 +432,7 @@ jobs:
432432
git rev-parse HEAD
433433
php /usr/bin/composer install --no-progress --ignore-platform-reqs
434434
export ASAN_OPTIONS=exitcode=139
435-
php $GITHUB_WORKSPACE/.github/patch.php vendor/bin/phpunit || EXIT_CODE=$?
435+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/phpunit || EXIT_CODE=$?
436436
if [ ${EXIT_CODE:-0} -gt 128 ]; then
437437
exit 1
438438
fi
@@ -452,7 +452,7 @@ jobs:
452452
export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
453453
X=0
454454
for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
455-
php $GITHUB_WORKSPACE/.github/patch.php ./phpunit $component --exclude-group tty,benchmark,intl-data,transient --exclude-group skip || EXIT_CODE=$?
455+
php $GITHUB_WORKSPACE/.github/jit_check.php ./phpunit $component --exclude-group tty,benchmark,intl-data,transient --exclude-group skip || EXIT_CODE=$?
456456
if [ ${EXIT_CODE:-0} -gt 128 ]; then
457457
X=1;
458458
fi
@@ -467,7 +467,7 @@ jobs:
467467
export ASAN_OPTIONS=exitcode=139
468468
export PHPSECLIB_ALLOW_JIT=1
469469
php /usr/bin/composer install --no-progress --ignore-platform-reqs
470-
php $GITHUB_WORKSPACE/.github/patch.php vendor/bin/paratest --verbose --configuration=tests/phpunit.xml --runner=WrapperRunner || exit $?
470+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/paratest --verbose --configuration=tests/phpunit.xml --runner=WrapperRunner || exit $?
471471
- name: Test PHPUnit
472472
if: always()
473473
run: |
@@ -476,7 +476,7 @@ jobs:
476476
git rev-parse HEAD
477477
export ASAN_OPTIONS=exitcode=139
478478
php /usr/bin/composer install --no-progress --ignore-platform-reqs
479-
php $GITHUB_WORKSPACE/.github/patch.php ./phpunit || EXIT_CODE=$?
479+
php $GITHUB_WORKSPACE/.github/jit_check.php ./phpunit || EXIT_CODE=$?
480480
if [ ${EXIT_CODE:-0} -gt 128 ]; then
481481
exit 1
482482
fi
@@ -500,7 +500,7 @@ jobs:
500500
sed -i 's/youremptytestdbnamehere/test/g' wp-tests-config.php
501501
sed -i 's/yourusernamehere/root/g' wp-tests-config.php
502502
sed -i 's/yourpasswordhere/root/g' wp-tests-config.php
503-
php $GITHUB_WORKSPACE/.github/patch.php vendor/bin/phpunit || EXIT_CODE=$?
503+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/phpunit || EXIT_CODE=$?
504504
if [ $EXIT_CODE -gt 128 ]; then
505505
exit 1
506506
fi

0 commit comments

Comments
 (0)