Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
50 changes: 46 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: ffi
ini-values: ffi.enable=1, zend.assertions=1, opcache.jit=off
ini-values: ffi.enable=1, zend.assertions=1, opcache.enable=0, opcache.enable_cli=0, opcache.jit=off
coverage: none

- name: Validate composer manifest
Expand All @@ -32,6 +32,33 @@ jobs:
- name: Unit and lifecycle tests
run: vendor/bin/phpunit

tests-opcache:
name: Tests under opcache (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
steps:
- uses: actions/checkout@v4
Comment thread
lisachenko marked this conversation as resolved.
Resolved

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ffi, opcache
# JIT stays off: it rewrites the executor internals z-engine hooks into
ini-values: ffi.enable=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.jit=off, opcache.jit_buffer_size=0
coverage: none

- name: Assert opcache is active in the CLI SAPI
run: php -r 'exit((int) !(function_exists("opcache_get_status") && opcache_get_status(false) !== false && ini_get("opcache.enable_cli")));'

- name: Install dependencies
run: composer install --no-interaction --no-progress

- name: Unit and lifecycle tests under opcache
run: vendor/bin/phpunit

soak:
name: Flat-memory soak (5k request cycles, PHP ${{ matrix.php }})
runs-on: ubuntu-latest
Expand All @@ -46,7 +73,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: ffi
ini-values: ffi.enable=1, opcache.jit=off
ini-values: ffi.enable=1, opcache.enable=0, opcache.enable_cli=0, opcache.jit=off
coverage: none

- name: Install dependencies
Expand All @@ -69,7 +96,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: ffi
ini-values: ffi.enable=1, opcache.jit=off
ini-values: ffi.enable=1, opcache.enable=0, opcache.enable_cli=0, opcache.jit=off
coverage: none

- name: Install dependencies
Expand All @@ -92,7 +119,10 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: ffi
ini-values: ffi.enable=1, opcache.jit=off
# opcache.enable=0 pins the posture: the CGI SAPI defaults it to On, so
# without the pin this gate silently runs under opcache on runners that
# ship the extension enabled
ini-values: ffi.enable=1, opcache.enable=0, opcache.enable_cli=0, opcache.jit=off
coverage: none

- name: Install FastCGI client
Expand All @@ -103,3 +133,15 @@ jobs:

- name: Objects survive real RINIT/RSHUTDOWN boundaries
run: bash tools/request-boundary/run.sh 100

# The multi-request gate can also be driven under opcache - locally only, not as a
# CI job. The CGI SAPI defaults opcache.enable to On, so any php-cgi whose ini does
# not pin it off (as the job above does) caches the gate script in opcache SHM,
# where its compile-time literals become IS_STR_PERMANENT strings that the persister
# keeps by pointer instead of copying:
#
# bash tools/request-boundary/run.sh 100
#
# with Zend OPcache loaded and opcache.enable=1 (keep opcache.jit=off and
# opcache.jit_buffer_size=0 - the JIT rewrites the executor internals z-engine
# hooks into).
Loading