From c8cd3aeb1ed2d6f860d1637786277dbb8840a21b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 24 Feb 2026 10:07:44 +0100 Subject: [PATCH 1/4] Fix ccache for coverage and pecl builds Coverage cannot use ccache as it is incompatible with gcov. Pecl clones PHP to the ./php directory, rather than the cwd. Closes GH-21285 --- .github/actions/ccache/action.yml | 9 ++++++--- .github/workflows/test-suite.yml | 5 +---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/ccache/action.yml b/.github/actions/ccache/action.yml index 4b06bc90871f..5febb36af2e4 100644 --- a/.github/actions/ccache/action.yml +++ b/.github/actions/ccache/action.yml @@ -2,6 +2,9 @@ name: ccache inputs: name: required: true + php_directory: + required: false + default: '.' runs: using: composite steps: @@ -9,9 +12,9 @@ runs: shell: bash id: cache_key run: | - major=$(cat main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p') - minor=$(cat main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p') - release=$(cat main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p') + major=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p') + minor=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p') + release=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p') week=$(date +"%Y-%W") prefix="${{ inputs.name }}-$major.$minor.$release" echo "key=$prefix-$week" >> $GITHUB_OUTPUT diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index c206ba4220b4..534366e70904 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -396,10 +396,6 @@ jobs: uses: ./.github/actions/apt-x64 - name: Install gcovr run: sudo -H pip install gcovr - - name: ccache - uses: ./.github/actions/ccache - with: - name: "${{ github.job }}" - name: ./configure uses: ./.github/actions/configure-x64 with: @@ -880,6 +876,7 @@ jobs: uses: ./.github/actions/ccache with: name: "${{ github.job }}" + php_directory: php - name: build PHP run: | cd php From ee40ca3fe27b6b3af68e8c19a4fa5c4735bea54a Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 24 Feb 2026 10:33:19 +0100 Subject: [PATCH 2/4] Fix coverage label job selection --- .github/matrix.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/matrix.php b/.github/matrix.php index 829ddfe884f5..9164dd4b3c00 100644 --- a/.github/matrix.php +++ b/.github/matrix.php @@ -52,7 +52,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re $test_alpine = in_array('CI: Alpine', $labels, true); $test_benchmarking = in_array('CI: Benchmarking', $labels, true); $test_community = in_array('CI: Community', $labels, true); - $test_coverage = in_array('CI: COVERAGE', $labels, true); + $test_coverage = in_array('CI: Coverage', $labels, true); $test_freebsd = in_array('CI: FreeBSD', $labels, true); $test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true); $test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true); From 68d4ee357b8d359fce82a0e3aab34e380867b4ba Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 24 Feb 2026 10:14:29 +0100 Subject: [PATCH 3/4] Fix ccache for alpine and msan Declare CC/CXX through the ccache action. Closes GH-21286 --- .github/actions/ccache/action.yml | 10 ++++++++-- .github/workflows/test-suite.yml | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/actions/ccache/action.yml b/.github/actions/ccache/action.yml index 5febb36af2e4..a73a6cbe1e7d 100644 --- a/.github/actions/ccache/action.yml +++ b/.github/actions/ccache/action.yml @@ -5,6 +5,12 @@ inputs: php_directory: required: false default: '.' + cc: + required: false + default: 'gcc' + cxx: + required: false + default: 'g++' runs: using: composite steps: @@ -29,5 +35,5 @@ runs: - name: Export CC/CXX shell: bash run: | - echo "CC=ccache gcc" >> $GITHUB_ENV - echo "CXX=ccache g++" >> $GITHUB_ENV + echo "CC=ccache ${{ inputs.cc }}" >> $GITHUB_ENV + echo "CXX=ccache ${{ inputs.cxx }}" >> $GITHUB_ENV diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 534366e70904..ea90b9345082 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -76,14 +76,14 @@ jobs: uses: ./.github/actions/ccache with: name: "${{ github.job }}" + cc: clang-20 + cxx: clang++-20 - name: ./configure uses: ./.github/actions/configure-alpine with: configurationParameters: >- CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" - CC=clang-20 - CXX=clang++-20 --enable-debug --enable-zts skipSlow: true # FIXME: This should likely include slow extensions @@ -708,10 +708,10 @@ jobs: uses: ./.github/actions/ccache with: name: "${{ github.job }}" + cc: clang + cxx: clang++ - name: ./configure run: | - export CC=clang - export CXX=clang++ export CFLAGS="-DZEND_TRACK_ARENA_ALLOC" ./buildconf --force # msan requires all used libraries to be instrumented, From 46073db99010209c25ba9a4f0621b734d6cad782 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 24 Feb 2026 10:57:45 +0100 Subject: [PATCH 4/4] Fix benchmarking head sha See https://github.com/orgs/community/discussions/47804 Closes GH-21287 --- .github/workflows/test-suite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index ea90b9345082..55a6f7dcdc18 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -1074,8 +1074,8 @@ jobs: run: |- set -x php benchmark/generate_diff.php \ - ${{ github.sha }} \ - $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \ + ${{ github.event.pull_request.head.sha }} \ + $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) \ > $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v6 with: