Skip to content

Commit 5150641

Browse files
committed
Fix enabling of opcache in CI
Closes GH-21246
1 parent 60718c7 commit 5150641

4 files changed

Lines changed: 41 additions & 37 deletions

File tree

.github/actions/configure-x64/action.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ inputs:
33
configurationParameters:
44
default: ''
55
required: false
6+
skipSlow:
7+
default: false
8+
required: false
69
asan:
710
default: false
811
required: false
@@ -20,9 +23,9 @@ runs:
2023
--enable-fpm \
2124
--with-pdo-mysql=mysqlnd \
2225
--with-mysqli=mysqlnd \
23-
--with-pgsql \
24-
--with-pdo-pgsql \
25-
--with-pdo-sqlite \
26+
${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \
27+
${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \
28+
${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \
2629
--enable-intl \
2730
--without-pear \
2831
--enable-gd \
@@ -37,7 +40,7 @@ runs:
3740
--enable-soap \
3841
--enable-xmlreader \
3942
--with-xsl \
40-
--with-tidy \
43+
${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \
4144
--enable-sysvsem \
4245
--enable-sysvshm \
4346
--enable-shmop \
@@ -54,14 +57,14 @@ runs:
5457
--enable-calendar \
5558
--enable-ftp \
5659
--with-pspell=/usr \
57-
--with-enchant=/usr \
60+
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
5861
--with-kerberos \
5962
--enable-sysvmsg \
6063
--with-ffi \
6164
--enable-zend-test \
62-
--enable-dl-test=shared \
63-
--with-ldap \
64-
--with-ldap-sasl \
65+
${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \
66+
${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \
67+
${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \
6568
--with-password-argon2 \
6669
--with-mhash \
6770
--with-sodium \
@@ -72,16 +75,16 @@ runs:
7275
--with-tcadb \
7376
--with-lmdb \
7477
--with-qdbm \
75-
--with-snmp \
76-
--with-unixODBC \
78+
${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \
79+
${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \
7780
--with-imap \
7881
--with-imap-ssl \
79-
--with-pdo-odbc=unixODBC,/usr \
82+
${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \
8083
$([ -d "/opt/oracle/instantclient" ] && echo '--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient') \
8184
$([ -d "/opt/oracle/instantclient" ] && echo '--with-oci8=shared,instantclient,/opt/oracle/instantclient') \
8285
--with-config-file-path=/etc \
8386
--with-config-file-scan-dir=/etc/php.d \
84-
--with-pdo-firebird \
85-
--with-pdo-dblib \
87+
${{ inputs.skipSlow == 'false' && '--with-pdo-firebird' || '' }} \
88+
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
8689
--enable-werror \
8790
${{ inputs.configurationParameters }}

.github/actions/test-linux/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ inputs:
33
runTestsParameters:
44
default: ''
55
required: false
6+
enableOpcache:
7+
default: 'false'
8+
required: false
69
jitType:
710
default: 'disable'
811
required: false
@@ -37,6 +40,7 @@ runs:
3740
fi
3841
export SKIP_IO_CAPTURE_TESTS=1
3942
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
43+
${{ inputs.enableOpcache == 'true' && '-d zend_extension=opcache.so -d opcache.enable_cli=1' }} \
4044
-d opcache.jit=${{ inputs.jitType }} \
4145
-d opcache.jit_buffer_size=16M \
4246
${{ inputs.idleCpu == 'true' && '-j$(($(/usr/bin/nproc) - 1))' || '-j$(/usr/bin/nproc)' }} \

.github/actions/test-macos/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ inputs:
33
runTestsParameters:
44
default: ''
55
required: false
6+
enableOpcache:
7+
default: 'false'
8+
required: false
69
jitType:
710
default: 'disable'
811
required: false
@@ -15,6 +18,7 @@ runs:
1518
export SKIP_IO_CAPTURE_TESTS=1
1619
export CI_NO_IPV6=1
1720
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
21+
${{ inputs.enableOpcache == 'true' && '-d zend_extension=opcache.so -d opcache.enable_cli=1' }} \
1822
-d opcache.jit=${{ inputs.jitType }} \
1923
-d opcache.jit_buffer_size=16M \
2024
-j$(($(sysctl -n hw.ncpu) - 1)) \

.github/workflows/nightly.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ jobs:
9090
- name: Test Tracing JIT
9191
uses: ./.github/actions/test-alpine
9292
with:
93+
enableOpcache: true
9394
jitType: tracing
9495
runTestsParameters: >-
9596
--asan -x
96-
-d opcache.enable_cli=1
9797
- name: Extra tests
9898
uses: ./.github/actions/extra-tests
9999
LINUX_X64:
@@ -185,33 +185,33 @@ jobs:
185185
- name: Test Tracing JIT
186186
uses: ./.github/actions/test-linux
187187
with:
188+
enableOpcache: true
188189
jitType: tracing
189190
runTestsParameters: >-
190191
${{ matrix.asan && '--asan' || '' }}
191192
${{ (matrix.asan && !inputs.all_variations) && '-x' || '' }}
192193
${{ matrix.repeat && '--repeat 2' || '' }}
193194
${{ matrix.variation && '-d zend_test.observer.enabled=1 -d zend_test.observer.show_output=0' || '' }}
194-
-d opcache.enable_cli=1
195195
- name: Test OpCache
196196
if: ${{ inputs.all_variations }}
197197
uses: ./.github/actions/test-linux
198198
with:
199+
enableOpcache: true
199200
runTestsParameters: >-
200201
${{ matrix.asan && '--asan' || '' }}
201202
${{ matrix.repeat && '--repeat 2' || '' }}
202203
${{ matrix.variation && '-d zend_test.observer.enabled=1 -d zend_test.observer.show_output=0' || '' }}
203-
-d opcache.enable_cli=1
204204
- name: Test Function JIT
205205
# ASAN frequently timeouts. Each test run takes ~90 minutes, we can
206206
# avoid running into the 6 hour timeout by skipping the function JIT.
207207
if: ${{ inputs.all_variations && !matrix.asan }}
208208
uses: ./.github/actions/test-linux
209209
with:
210+
enableOpcache: true
210211
jitType: function
211212
runTestsParameters: >-
212213
${{ matrix.repeat && '--repeat 2' || '' }}
213214
${{ matrix.variation && '-d zend_test.observer.enabled=1 -d zend_test.observer.show_output=0' || '' }}
214-
-d opcache.enable_cli=1
215215
- name: Extra tests
216216
uses: ./.github/actions/extra-tests
217217
- name: Verify generated files are up to date
@@ -282,22 +282,19 @@ jobs:
282282
- name: Test Tracing JIT
283283
uses: ./.github/actions/test-linux
284284
with:
285+
enableOpcache: true
285286
jitType: tracing
286-
runTestsParameters: >-
287-
-d opcache.enable_cli=1
288287
- name: Test OpCache
289288
if: ${{ inputs.all_variations }}
290289
uses: ./.github/actions/test-linux
291290
with:
292-
runTestsParameters: >-
293-
-d opcache.enable_cli=1
291+
enableOpcache: true
294292
- name: Test Function JIT
295293
if: ${{ inputs.all_variations }}
296294
uses: ./.github/actions/test-linux
297295
with:
296+
enableOpcache: true
298297
jitType: function
299-
runTestsParameters: >-
300-
-d opcache.enable_cli=1
301298
- name: Extra tests
302299
uses: ./.github/actions/extra-tests
303300
MACOS:
@@ -340,22 +337,19 @@ jobs:
340337
if: ${{ matrix.arch == 'X64' || !matrix.zts }}
341338
uses: ./.github/actions/test-macos
342339
with:
340+
enableOpcache: true
343341
jitType: tracing
344-
runTestsParameters: >-
345-
-d opcache.enable_cli=1
346342
- name: Test OpCache
347343
if: ${{ inputs.all_variations || (matrix.arch == 'ARM64' && matrix.zts) }}
348344
uses: ./.github/actions/test-macos
349345
with:
350-
runTestsParameters: >-
351-
-d opcache.enable_cli=1
346+
enableOpcache: true
352347
- name: Test Function JIT
353348
if: ${{ inputs.all_variations && (matrix.arch == 'X64' || !matrix.zts) }}
354349
uses: ./.github/actions/test-macos
355350
with:
351+
enableOpcache: true
356352
jitType: function
357-
runTestsParameters: >-
358-
-d opcache.enable_cli=1
359353
- name: Extra tests
360354
uses: ./.github/actions/extra-tests
361355
- name: Verify generated files are up to date
@@ -411,9 +405,8 @@ jobs:
411405
- name: Test OpCache
412406
uses: ./.github/actions/test-linux
413407
with:
408+
enableOpcache: true
414409
jitType: tracing
415-
runTestsParameters: >-
416-
-d opcache.enable_cli=1
417410
- uses: codecov/codecov-action@v5
418411
if: ${{ !cancelled() }}
419412
with:
@@ -655,34 +648,34 @@ jobs:
655648
- name: Test File Cache (prime shm)
656649
uses: ./.github/actions/test-linux
657650
with:
651+
enableOpcache: true
658652
runTestsParameters: >-
659-
-d opcache.enable_cli=1
660653
--file-cache-prime
661654
- name: Test File Cache (prime shm, use shm)
662655
uses: ./.github/actions/test-linux
663656
with:
657+
enableOpcache: true
664658
runTestsParameters: >-
665-
-d opcache.enable_cli=1
666659
--file-cache-use
667660
- name: Test File Cache (prime shm, use file)
668661
uses: ./.github/actions/test-linux
669662
with:
663+
enableOpcache: true
670664
runTestsParameters: >-
671-
-d opcache.enable_cli=1
672665
--file-cache-use
673666
-d opcache.file_cache_only=1
674667
- name: Test File Cache Only (prime)
675668
uses: ./.github/actions/test-linux
676669
with:
670+
enableOpcache: true
677671
runTestsParameters: >-
678-
-d opcache.enable_cli=1
679672
--file-cache-prime
680673
-d opcache.file_cache_only=1
681674
- name: Test File Cache Only (use)
682675
uses: ./.github/actions/test-linux
683676
with:
677+
enableOpcache: true
684678
runTestsParameters: >-
685-
-d opcache.enable_cli=1
686679
--file-cache-use
687680
-d opcache.file_cache_only=1
688681
- name: Verify generated files are up to date
@@ -769,9 +762,9 @@ jobs:
769762
- name: Test Opcache
770763
uses: ./.github/actions/test-linux
771764
with:
765+
enableOpcache: true
772766
runTestsParameters: >-
773767
--msan
774-
-d opcache.enable_cli=1
775768
- name: Verify generated files are up to date
776769
uses: ./.github/actions/verify-generated-files
777770
LIBMYSQLCLIENT:

0 commit comments

Comments
 (0)