Skip to content

Commit 1db2e55

Browse files
authored
Merge branch 'master' into parameter-doccomments
2 parents 4a848e5 + 9b022c4 commit 1db2e55

388 files changed

Lines changed: 26591 additions & 14336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ jobs:
166166
name: Test
167167
no_output_timeout: 30m
168168
command: |
169+
export RUN_RESOURCE_HEAVY_TESTS=1
169170
sapi/cli/php run-tests.php \
170171
-d opcache.enable_cli=1 \
171172
-d opcache.jit_buffer_size=64M \

.github/actions/ccache/action.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@ name: ccache
22
inputs:
33
name:
44
required: true
5+
php_directory:
6+
required: false
7+
default: '.'
8+
cc:
9+
required: false
10+
default: 'gcc'
11+
cxx:
12+
required: false
13+
default: 'g++'
514
runs:
615
using: composite
716
steps:
817
- name: Get cache key
918
shell: bash
1019
id: cache_key
1120
run: |
12-
major=$(cat main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
13-
minor=$(cat main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
14-
release=$(cat main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
21+
major=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
22+
minor=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
23+
release=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
1524
week=$(date +"%Y-%W")
1625
prefix="${{ inputs.name }}-$major.$minor.$release"
1726
echo "key=$prefix-$week" >> $GITHUB_OUTPUT
@@ -26,5 +35,5 @@ runs:
2635
- name: Export CC/CXX
2736
shell: bash
2837
run: |
29-
echo "CC=ccache gcc" >> $GITHUB_ENV
30-
echo "CXX=ccache g++" >> $GITHUB_ENV
38+
echo "CC=ccache ${{ inputs.cc }}" >> $GITHUB_ENV
39+
echo "CXX=ccache ${{ inputs.cxx }}" >> $GITHUB_ENV

.github/actions/freebsd/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ runs:
107107
export SKIP_IO_CAPTURE_TESTS=1
108108
export CI_NO_IPV6=1
109109
export STACK_LIMIT_DEFAULTS_CHECK=1
110+
export RUN_RESOURCE_HEAVY_TESTS=1
110111
sapi/cli/php run-tests.php \
111112
-P -q -j2 \
112113
-g FAIL,BORK,LEAK,XLEAK \

.github/actions/solaris/action.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Solaris
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runExtraTests:
7+
default: false
8+
required: false
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Solaris
13+
uses: vmactions/solaris-vm@v1
14+
with:
15+
release: "11.4-gcc"
16+
usesh: true
17+
copyback: false
18+
disable-cache: true
19+
prepare: |
20+
cd $GITHUB_WORKSPACE
21+
pkg install bison developer/icu libzip oniguruma re2c
22+
23+
./buildconf -f
24+
CC=gcc CXX=g++ \
25+
CFLAGS="-Wno-char-subscripts" \
26+
PATH=/usr/gnu/bin:/usr/bin \
27+
PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \
28+
./configure \
29+
--prefix=/usr/local \
30+
--enable-debug \
31+
--enable-werror \
32+
--enable-option-checking=fatal \
33+
--enable-fpm \
34+
--without-pear \
35+
--with-bz2 \
36+
--with-jpeg \
37+
--with-webp \
38+
--with-freetype \
39+
--enable-gd \
40+
--enable-exif \
41+
--with-zip \
42+
--with-zlib \
43+
--enable-soap \
44+
--enable-xmlreader \
45+
--with-xsl \
46+
--with-libxml \
47+
--enable-shmop \
48+
--enable-pcntl \
49+
--enable-mbstring \
50+
--with-curl \
51+
--enable-sockets \
52+
--with-openssl \
53+
--enable-bcmath \
54+
--enable-calendar \
55+
--enable-ftp \
56+
--enable-zend-test \
57+
--enable-dl-test=shared \
58+
--enable-intl \
59+
--with-mhash \
60+
--with-config-file-path=/etc \
61+
--with-config-file-scan-dir=/etc/php.d \
62+
${{ inputs.configurationParameters }}
63+
64+
gmake -j2
65+
mkdir /etc/php.d
66+
gmake install > /dev/null
67+
echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
68+
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
69+
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
70+
run: |
71+
cd $GITHUB_WORKSPACE
72+
73+
export SKIP_IO_CAPTURE_TESTS=1
74+
export CI_NO_IPV6=1
75+
export STACK_LIMIT_DEFAULTS_CHECK=1
76+
PATH=/usr/gnu/bin:/usr/bin \
77+
sapi/cli/php run-tests.php \
78+
-P -q -j1 \
79+
-g FAIL,BORK,LEAK,XLEAK \
80+
--no-progress \
81+
--offline \
82+
--show-diff \
83+
--show-slow 1000 \
84+
--set-timeout 120
85+
86+
if test "${{ inputs.runExtraTests }}" = "true"; then
87+
sapi/cli/php run-extra-tests.php
88+
fi

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ runs:
2525
# Slow tests criteron is doubled because this runner isn't as fast as others
2626
export SKIP_IO_CAPTURE_TESTS=1
2727
export STACK_LIMIT_DEFAULTS_CHECK=1
28+
export RUN_RESOURCE_HEAVY_TESTS=1
2829
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2930
-j$(nproc) \
3031
-g FAIL,BORK,LEAK,XLEAK \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ runs:
99
export PDO_MYSQL_TEST_HOST=127.0.0.1
1010
export PDO_MYSQL_TEST_USER=root
1111
export PDO_MYSQL_TEST_PASS=root
12+
export RUN_RESOURCE_HEAVY_TESTS=1
1213
sapi/cli/php run-tests.php -P -q \
1314
-g FAIL,BORK,LEAK,XLEAK \
1415
--no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ runs:
4444
export PDO_ODBC_TEST_DSN="odbc:Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=pdo_odbc;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS"
4545
export SKIP_IO_CAPTURE_TESTS=1
4646
export STACK_LIMIT_DEFAULTS_CHECK=1
47+
export RUN_RESOURCE_HEAVY_TESTS=1
4748
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
4849
${{ inputs.enableOpcache == 'true' && '-d opcache.enable_cli=1' || '' }} \
4950
-d opcache.jit=${{ inputs.jitType }} \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runs:
1818
export SKIP_IO_CAPTURE_TESTS=1
1919
export CI_NO_IPV6=1
2020
export STACK_LIMIT_DEFAULTS_CHECK=1
21+
export RUN_RESOURCE_HEAVY_TESTS=1
2122
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2223
${{ inputs.enableOpcache == 'true' && '-d opcache.enable_cli=1' || '' }} \
2324
-d opcache.jit=${{ inputs.jitType }} \

.github/matrix.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
5252
$test_alpine = in_array('CI: Alpine', $labels, true);
5353
$test_benchmarking = in_array('CI: Benchmarking', $labels, true);
5454
$test_community = in_array('CI: Community', $labels, true);
55-
$test_coverage = in_array('CI: COVERAGE', $labels, true);
55+
$test_coverage = in_array('CI: Coverage', $labels, true);
5656
$test_freebsd = in_array('CI: FreeBSD', $labels, true);
5757
$test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true);
5858
$test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true);
@@ -62,6 +62,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
6262
$test_msan = in_array('CI: MSAN', $labels, true);
6363
$test_opcache_variation = in_array('CI: Opcache Variation', $labels, true);
6464
$test_pecl = in_array('CI: PECL', $labels, true);
65+
$test_solaris = in_array('CI: Solaris', $labels, true);
6566
$test_windows = in_array('CI: Windows', $labels, true);
6667

6768
$jobs = [];
@@ -73,7 +74,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
7374
&& ($all_jobs || !$no_jobs || $test_benchmarking)
7475
// push trigger is restricted to official repository.
7576
&& ($repository === 'php/php-src' || $trigger === 'pull_request')) {
76-
$jobs['BENCHMARKING'] = true;
77+
$jobs['BENCHMARKING']['config']['integrated_opcache'] = version_compare($php_version, '8.5', '>=');
7778
}
7879
if ($all_jobs || $test_community) {
7980
$jobs['COMMUNITY']['matrix'] = version_compare($php_version, '8.4', '>=')
@@ -132,6 +133,9 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
132133
if (($all_jobs && $ref === 'master') || $test_pecl) {
133134
$jobs['PECL'] = true;
134135
}
136+
if (version_compare($php_version, '8.6', '>=') && ($all_jobs || $test_solaris)) {
137+
$jobs['SOLARIS'] = true;
138+
}
135139
if ($all_jobs || !$no_jobs || $test_windows) {
136140
$jobs['WINDOWS']['matrix'] = $all_variations
137141
? ['include' => [

.github/workflows/test-suite.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ jobs:
7676
uses: ./.github/actions/ccache
7777
with:
7878
name: "${{ github.job }}"
79+
cc: clang-20
80+
cxx: clang++-20
7981
- name: ./configure
8082
uses: ./.github/actions/configure-alpine
8183
with:
8284
configurationParameters: >-
8385
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
8486
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
85-
CC=clang-20
86-
CXX=clang++-20
8787
--enable-debug
8888
--enable-zts
8989
skipSlow: true # FIXME: This should likely include slow extensions
@@ -187,6 +187,7 @@ jobs:
187187
${{ matrix.variation && '-d zend_test.observer.enabled=1 -d zend_test.observer.show_output=0' || '' }}
188188
idleCpu: ${{ matrix.asan && 'true' || 'false' }}
189189
- name: Test Tracing JIT
190+
if: ${{ inputs.all_variations || matrix.asan }}
190191
uses: ./.github/actions/test-linux
191192
with:
192193
enableOpcache: true
@@ -208,7 +209,7 @@ jobs:
208209
- name: Test Function JIT
209210
# ASAN frequently timeouts. Each test run takes ~90 minutes, we can
210211
# avoid running into the 6 hour timeout by skipping the function JIT.
211-
if: ${{ inputs.all_variations && !matrix.asan }}
212+
if: ${{ !matrix.asan }}
212213
uses: ./.github/actions/test-linux
213214
with:
214215
enableOpcache: true
@@ -396,10 +397,6 @@ jobs:
396397
uses: ./.github/actions/apt-x64
397398
- name: Install gcovr
398399
run: sudo -H pip install gcovr
399-
- name: ccache
400-
uses: ./.github/actions/ccache
401-
with:
402-
name: "${{ github.job }}"
403400
- name: ./configure
404401
uses: ./.github/actions/configure-x64
405402
with:
@@ -712,10 +709,10 @@ jobs:
712709
uses: ./.github/actions/ccache
713710
with:
714711
name: "${{ github.job }}"
712+
cc: clang
713+
cxx: clang++
715714
- name: ./configure
716715
run: |
717-
export CC=clang
718-
export CXX=clang++
719716
export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
720717
./buildconf --force
721718
# msan requires all used libraries to be instrumented,
@@ -880,6 +877,7 @@ jobs:
880877
uses: ./.github/actions/ccache
881878
with:
882879
name: "${{ github.job }}"
880+
php_directory: php
883881
- name: build PHP
884882
run: |
885883
cd php
@@ -981,6 +979,21 @@ jobs:
981979
configurationParameters: >-
982980
--${{ matrix.zts && 'enable' || 'disable' }}-zts
983981
runExtraTests: true
982+
SOLARIS:
983+
if: ${{ fromJson(inputs.branch).jobs.SOLARIS }}
984+
name: "SOLARIS"
985+
runs-on: ubuntu-latest
986+
timeout-minutes: 50
987+
steps:
988+
- name: git checkout
989+
uses: actions/checkout@v5
990+
with:
991+
ref: ${{ fromJson(inputs.branch).ref }}
992+
- name: Solaris
993+
uses: ./.github/actions/solaris
994+
with:
995+
configurationParameters: --disable-zts
996+
runExtraTests: true
984997
BENCHMARKING:
985998
name: BENCHMARKING
986999
if: ${{ fromJson(inputs.branch).jobs.BENCHMARKING }}
@@ -1038,6 +1051,7 @@ jobs:
10381051
sudo mkdir -p /etc/php.d
10391052
sudo chmod 777 /etc/php.d
10401053
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
1054+
${{ !fromJson(inputs.branch).jobs.BENCHMARKING.config.integrated_opcache && 'echo zend_extension=opcache.so >> /etc/php.d/opcache.ini' || '' }}
10411055
echo opcache.enable=1 >> /etc/php.d/opcache.ini
10421056
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
10431057
- name: Setup
@@ -1078,7 +1092,7 @@ jobs:
10781092
set -x
10791093
php benchmark/generate_diff.php \
10801094
${{ github.sha }} \
1081-
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
1095+
${{ github.event.pull_request.base.sha }} \
10821096
> $GITHUB_STEP_SUMMARY
10831097
- uses: actions/upload-artifact@v6
10841098
with:

0 commit comments

Comments
 (0)